|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.parser.UnitProcessor
org.apache.batik.bridge.UnitProcessor
public abstract class UnitProcessor
This class provides methods to convert SVG length and coordinate to float in user units.
| Nested Class Summary | |
|---|---|
static class |
UnitProcessor.DefaultContext
This class is the default context for a particular element. |
| Nested classes/interfaces inherited from class org.apache.batik.parser.UnitProcessor |
|---|
UnitProcessor.Context, UnitProcessor.UnitResolver |
| Field Summary |
|---|
| Fields inherited from class org.apache.batik.parser.UnitProcessor |
|---|
HORIZONTAL_LENGTH, OTHER_LENGTH, VERTICAL_LENGTH |
| Constructor Summary | |
|---|---|
UnitProcessor()
|
|
| Method Summary | |
|---|---|
static UnitProcessor.Context |
createContext(BridgeContext ctx,
Element e)
Creates a context for the specified element. |
protected static BridgeContext |
getBridgeContext(UnitProcessor.Context ctx)
Returns the BridgeContext from the given UnitProcessor.DefaultContext
if it is a UnitProcessor.DefaultContext, or null otherwise. |
static float |
svgHorizontalCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified horizontal coordinate in object bounding box coordinate system. |
static float |
svgHorizontalCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified horizontal coordinate in user units. |
static float |
svgHorizontalLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified horizontal length in object bounding box coordinate system. |
static float |
svgHorizontalLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified horizontal length in user units. |
static float |
svgLengthToObjectBoundingBox(String s,
String attr,
short d,
UnitProcessor.Context ctx)
Returns the specified length with the specified direction in user units. |
static float |
svgLengthToUserSpace(String s,
String attr,
short d,
UnitProcessor.Context ctx)
Returns the specified length with the specified direction in user units. |
static float |
svgOtherCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified 'other' coordinate in object bounding box coordinate system. |
static float |
svgOtherCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified 'other' coordinate in user units. |
static float |
svgOtherLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified 'other' length in object bounding box coordinate system. |
static float |
svgOtherLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified 'other' length in user units. |
static float |
svgToObjectBoundingBox(String s,
String attr,
short d,
UnitProcessor.Context ctx)
Returns the specified value with the specified direction in objectBoundingBox units. |
static float |
svgToUserSpace(String s,
String attr,
short d,
UnitProcessor.Context ctx)
Returns the specified coordinate with the specified direction in user units. |
static float |
svgVerticalCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified vertical coordinate in object bounding box coordinate system. |
static float |
svgVerticalCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified vertical coordinate in user units. |
static float |
svgVerticalLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified vertical length in object bounding box coordinate system. |
static float |
svgVerticalLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
Returns the specified vertical length in user units. |
| Methods inherited from class org.apache.batik.parser.UnitProcessor |
|---|
emsToPixels, exsToPixels, percentagesToPixels, pixelsToEms, pixelsToExs, pixelsToPercentages, svgToObjectBoundingBox, svgToUserSpace, userSpaceToSVG |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UnitProcessor()
| Method Detail |
|---|
public static UnitProcessor.Context createContext(BridgeContext ctx,
Element e)
ctx - the bridge context that contains the user agent and
viewport definitione - the element interested in its context
public static float svgHorizontalCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the horizontal coordinateattr - the attribute name that represents the coordinatectx - the context used to resolve relative value
public static float svgVerticalCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the vertical coordinateattr - the attribute name that represents the coordinatectx - the context used to resolve relative value
public static float svgOtherCoordinateToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the 'other' coordinateattr - the attribute name that represents the coordinatectx - the context used to resolve relative value
public static float svgHorizontalLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the 'other' lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgVerticalLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the vertical lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgOtherLengthToObjectBoundingBox(String s,
String attr,
UnitProcessor.Context ctx)
s - the 'other' lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgLengthToObjectBoundingBox(String s,
String attr,
short d,
UnitProcessor.Context ctx)
s - the lengthattr - the attribute name that represents the lengthd - the direction of the lengthctx - the context used to resolve relative value
public static float svgToObjectBoundingBox(String s,
String attr,
short d,
UnitProcessor.Context ctx)
s - the valueattr - the attribute name that represents the valued - the direction of the valuectx - the context used to resolve relative value
public static float svgHorizontalLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the horizontal lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgVerticalLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the vertical lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgOtherLengthToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the 'other' lengthattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgHorizontalCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the horizontal coordinateattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgVerticalCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the vertical coordinateattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgOtherCoordinateToUserSpace(String s,
String attr,
UnitProcessor.Context ctx)
s - the 'other' coordinateattr - the attribute name that represents the lengthctx - the context used to resolve relative value
public static float svgLengthToUserSpace(String s,
String attr,
short d,
UnitProcessor.Context ctx)
s - the 'other' coordinateattr - the attribute name that represents the lengthd - the direction of the lengthctx - the context used to resolve relative value
public static float svgToUserSpace(String s,
String attr,
short d,
UnitProcessor.Context ctx)
s - the 'other' coordinateattr - the attribute name that represents the lengthd - the direction of the coordinatectx - the context used to resolve relative valueprotected static BridgeContext getBridgeContext(UnitProcessor.Context ctx)
BridgeContext from the given UnitProcessor.DefaultContext
if it is a UnitProcessor.DefaultContext, or null otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||