org.apache.fop.fo.extensions.svg
Class SVGElement.PDFUnitContext
java.lang.Object
org.apache.fop.fo.extensions.svg.SVGElement.PDFUnitContext
- SVGElement
- UnitProcessor.Context
public static class SVGElement.PDFUnitContext
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.
PDFUnitContext(int size, Element e, float ptmm) - Create a PDF unit context.
|
PDFUnitContext
public PDFUnitContext(int size,
Element e,
float ptmm)
Create a PDF unit context.
size
- the font size.e
- the svg elementptmm
- the pixel to millimeter factor
getElement
public Element getElement()
Returns the element.
getFontSize
public float getFontSize()
Returns the font-size value.
getParentElementContext
public UnitProcessor.Context getParentElementContext()
Returns the context of the parent element of this context.
Since this is always for the root SVG element there never
should be one...
getPixelToMM
public float getPixelToMM()
Returns the pixel to mm factor. (this is deprecated)
- the pixel to millimeter factor
getPixelUnitToMillimeter
public float getPixelUnitToMillimeter()
Returns the pixel to mm factor.
- the pixel to millimeter factor
getViewportHeight
public float getViewportHeight()
Returns the viewport height used to compute units.
- the default viewport height of 100
getViewportWidth
public float getViewportWidth()
Returns the viewport width used to compute units.
- the default viewport width of 100
getXHeight
public float getXHeight()
Returns the x-height value.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.