org.apache.batik.bridge

Class UnitProcessor.DefaultContext

public static class UnitProcessor.DefaultContext extends Object implements 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
protected BridgeContextctx
The bridge context.
protected Elemente
The element.
Constructor Summary
DefaultContext(BridgeContext ctx, Element e)
Creates a new DefaultContext.
Method Summary
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

ctx

protected BridgeContext ctx
The bridge context.

e

protected Element e
The element.

Constructor Detail

DefaultContext

public DefaultContext(BridgeContext ctx, Element e)
Creates a new DefaultContext.

Method Detail

getElement

public Element getElement()
Returns the element.

getFontSize

public float getFontSize()
Returns the font-size value.

getPixelToMM

public float getPixelToMM()
Returns the size of a px CSS unit in millimeters. This will be removed after next release.

See Also: getPixelUnitToMillimeter

getPixelUnitToMillimeter

public float getPixelUnitToMillimeter()
Returns the size of a px CSS unit in millimeters.

getViewportHeight

public float getViewportHeight()
Returns the viewport height used to compute units.

getViewportWidth

public float getViewportWidth()
Returns the viewport width used to compute units.

getXHeight

public float getXHeight()
Returns the x-height value.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.