org.apache.batik.dom.svg
Class DefaultUnitProcessorContext

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

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

The default unit processor context.


Field Summary
protected  SVGContext context
           
protected  SVGElement element
           
 
Constructor Summary
DefaultUnitProcessorContext(SVGContext ctx, SVGElement elt)
           
 
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

context

protected SVGContext context

element

protected SVGElement element
Constructor Detail

DefaultUnitProcessorContext

public DefaultUnitProcessorContext(SVGContext ctx,
                                   SVGElement elt)
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.