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 BridgeContextThe bridge context.protected ElementThe element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the element.floatReturns the font-size value.floatReturns the size of a px CSS unit in millimeters.floatReturns the size of a px CSS unit in millimeters.floatReturns the viewport height used to compute units.floatReturns the viewport width used to compute units.floatReturns 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:
getElementin interfaceUnitProcessor.Context
-
getPixelUnitToMillimeter
public float getPixelUnitToMillimeter()Returns the size of a px CSS unit in millimeters.- Specified by:
getPixelUnitToMillimeterin 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:
getPixelToMMin interfaceUnitProcessor.Context- See Also:
-
getFontSize
public float getFontSize()Returns the font-size value.- Specified by:
getFontSizein interfaceUnitProcessor.Context
-
getXHeight
public float getXHeight()Returns the x-height value.- Specified by:
getXHeightin interfaceUnitProcessor.Context
-
getViewportWidth
public float getViewportWidth()Returns the viewport width used to compute units.- Specified by:
getViewportWidthin interfaceUnitProcessor.Context
-
getViewportHeight
public float getViewportHeight()Returns the viewport height used to compute units.- Specified by:
getViewportHeightin interfaceUnitProcessor.Context
-