org.apache.batik.refimpl.bridge
Class DefaultUnitProcessorContext

java.lang.Object
  |
  +--org.apache.batik.refimpl.bridge.DefaultUnitProcessorContext
All Implemented Interfaces:
UnitProcessor.Context

public class DefaultUnitProcessorContext
extends java.lang.Object
implements UnitProcessor.Context

The default unit processor context.


Field Summary
protected  CSSStyleDeclaration cssDecl
           
protected  BridgeContext ctx
           
 
Constructor Summary
DefaultUnitProcessorContext(BridgeContext ctx, CSSStyleDeclaration cssDecl)
           
 
Method Summary
 CSSPrimitiveValue getFontSize(SVGElement e)
          Returns the font-size value.
 float getMediumFontSize()
          Returns the font-size medium value in pt.
 ParserFactory getParserFactory()
          Returns the parser factory.
 float getPixelToMM()
          Returns the pixel to mm factor.
 Viewport getViewport()
          Returns the viewport to use to compute the percentages and the units.
 float getXHeight(SVGElement e)
          Returns the x-height value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

protected BridgeContext ctx

cssDecl

protected CSSStyleDeclaration cssDecl
Constructor Detail

DefaultUnitProcessorContext

public DefaultUnitProcessorContext(BridgeContext ctx,
                                   CSSStyleDeclaration cssDecl)
Method Detail

getPixelToMM

public float getPixelToMM()
Returns the pixel to mm factor.
Specified by:
getPixelToMM in interface UnitProcessor.Context

getParserFactory

public ParserFactory getParserFactory()
Returns the parser factory.
Specified by:
getParserFactory in interface UnitProcessor.Context

getMediumFontSize

public float getMediumFontSize()
Returns the font-size medium value in pt.
Specified by:
getMediumFontSize in interface UnitProcessor.Context

getFontSize

public CSSPrimitiveValue getFontSize(SVGElement e)
Returns the font-size value.
Specified by:
getFontSize in interface UnitProcessor.Context

getXHeight

public float getXHeight(SVGElement e)
Returns the x-height value.
Specified by:
getXHeight in interface UnitProcessor.Context

getViewport

public Viewport getViewport()
Returns the viewport to use to compute the percentages and the units.
Specified by:
getViewport in interface UnitProcessor.Context


Copyright © 2000 Apache Software Foundation. All Rights Reserved.