org.apache.batik.parser
public abstract class UnitProcessor extends Object
Nested Class Summary | |
---|---|
interface | UnitProcessor.Context
Holds the informations needed to compute the units. |
static class | UnitProcessor.UnitResolver
A LengthHandler that convert units. |
Field Summary | |
---|---|
static short | HORIZONTAL_LENGTH
This constant represents horizontal lengths. |
static short | OTHER_LENGTH
This constant represents other lengths. |
static short | VERTICAL_LENGTH
This constant represents vertical lengths. |
Constructor Summary | |
---|---|
protected | UnitProcessor()
No instance of this class is required. |
Method Summary | |
---|---|
protected static float | emsToPixels(float v, short d, UnitProcessor.Context ctx)
Converts ems units to user units.
|
protected static float | exsToPixels(float v, short d, UnitProcessor.Context ctx)
Converts exs units to user units.
|
protected static float | percentagesToPixels(float v, short d, UnitProcessor.Context ctx)
Converts percentages to user units.
|
protected static float | pixelsToEms(float v, short d, UnitProcessor.Context ctx)
Converts user units to ems units.
|
protected static float | pixelsToExs(float v, short d, UnitProcessor.Context ctx)
Converts user units to exs units.
|
protected static float | pixelsToPercentages(float v, short d, UnitProcessor.Context ctx)
Converts user units to percentages relative to the viewport.
|
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 | svgToObjectBoundingBox(float value, short type, 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 | svgToUserSpace(float v, short type, short d, UnitProcessor.Context ctx)
Converts the specified value of the specified type and
direction to user units.
|
static float | userSpaceToSVG(float v, short type, short d, UnitProcessor.Context ctx)
Converts the specified value of the specified type and
direction to SVG units.
|
Parameters: v the value to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: v the value to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: v the percentage to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: v the value to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: v the value to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: v the value to convert d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context
Parameters: s the value attr the attribute name that represents the value d the direction of the value ctx the context used to resolve relative value
Parameters: value the value type the type of the value d the direction of the value ctx the context used to resolve relative value
Parameters: s the 'other' coordinate attr the attribute name that represents the length d the direction of the coordinate ctx the context used to resolve relative value
Parameters: v the value to convert type the type of the value d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context used to resolve relative value
Parameters: v the value to convert type the type of the value d HORIZONTAL_LENGTH, VERTICAL_LENGTH, or OTHER_LENGTH ctx the context used to resolve relative value