Class 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 BridgeContext ctx
      The bridge context.
      protected org.w3c.dom.Element e
      The 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.Element getElement()
      Returns the element.
      float getFontSize()
      Returns the font-size value.
      float getPixelToMM()
      Returns the size of a px CSS unit in millimeters.
      float getPixelUnitToMillimeter()
      Returns the size of a px CSS unit in millimeters.
      float getViewportHeight()
      Returns the viewport height used to compute units.
      float getViewportWidth()
      Returns the viewport width used to compute units.
      float getXHeight()
      Returns the x-height value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait