Package org.apache.batik.bridge
Class UnitProcessor.DefaultContext
java.lang.Object
org.apache.batik.bridge.UnitProcessor.DefaultContext
- All Implemented Interfaces:
UnitProcessor.Context
- Enclosing class:
- UnitProcessor
This class is the default context for a particular element. Information
not available on the element are obtained from the bridge context (such
as the viewport or the pixel to millimeter factor).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BridgeContext
The bridge context.protected Element
The element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the element.float
Returns the font-size value.float
Returns the size of a px CSS unit in millimeters.float
Returns the size of a px CSS unit in millimeters.float
Returns the viewport height used to compute units.float
Returns the viewport width used to compute units.float
Returns the x-height value.
-
Field Details
-
e
The element. -
ctx
The bridge context.
-
-
Constructor Details
-
DefaultContext
Creates a new DefaultContext.
-
-
Method Details
-
getElement
Returns the element.- Specified by:
getElement
in interfaceUnitProcessor.Context
-
getPixelUnitToMillimeter
public float getPixelUnitToMillimeter()Returns the size of a px CSS unit in millimeters.- Specified by:
getPixelUnitToMillimeter
in interfaceUnitProcessor.Context
-
getPixelToMM
public float getPixelToMM()Returns the size of a px CSS unit in millimeters. This will be removed after next release.- Specified by:
getPixelToMM
in interfaceUnitProcessor.Context
- See Also:
-
getFontSize
public float getFontSize()Returns the font-size value.- Specified by:
getFontSize
in interfaceUnitProcessor.Context
-
getXHeight
public float getXHeight()Returns the x-height value.- Specified by:
getXHeight
in interfaceUnitProcessor.Context
-
getViewportWidth
public float getViewportWidth()Returns the viewport width used to compute units.- Specified by:
getViewportWidth
in interfaceUnitProcessor.Context
-
getViewportHeight
public float getViewportHeight()Returns the viewport height used to compute units.- Specified by:
getViewportHeight
in interfaceUnitProcessor.Context
-