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
public static class UnitProcessor.DefaultContext extends java.lang.Object implements UnitProcessor.Context
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
Fields Modifier and Type Field Description protected BridgeContextctxThe bridge context.protected org.w3c.dom.ElementeThe element.
-
Constructor Summary
Constructors Constructor Description DefaultContext(BridgeContext ctx, org.w3c.dom.Element e)Creates a new DefaultContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.ElementgetElement()Returns the element.floatgetFontSize()Returns the font-size value.floatgetPixelToMM()Returns the size of a px CSS unit in millimeters.floatgetPixelUnitToMillimeter()Returns the size of a px CSS unit in millimeters.floatgetViewportHeight()Returns the viewport height used to compute units.floatgetViewportWidth()Returns the viewport width used to compute units.floatgetXHeight()Returns the x-height value.
-
-
-
Field Detail
-
e
protected org.w3c.dom.Element e
The element.
-
ctx
protected BridgeContext ctx
The bridge context.
-
-
Constructor Detail
-
DefaultContext
public DefaultContext(BridgeContext ctx, org.w3c.dom.Element e)
Creates a new DefaultContext.
-
-
Method Detail
-
getElement
public org.w3c.dom.Element 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:
getPixelUnitToMillimeter()
-
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
-
-