Class SVGElement

    • Constructor Detail

      • SVGElement

        public SVGElement​(FONode parent)
        Constructs an SVG object
        Parameters:
        parent - the parent formatting object
    • Method Detail

      • getContentHandlerFactory

        public ContentHandlerFactory getContentHandlerFactory()
        This method is overridden by extension elements and allows the extension element to return a ContentHandlerFactory. This factory can create ContentHandler implementations that handle foreign XML content by either building up a specific DOM, a Java object or something else.
        Overrides:
        getContentHandlerFactory in class FONode
        Returns:
        the ContentHandlerFactory or null if not applicable
      • getDimension

        public java.awt.geom.Point2D getDimension​(java.awt.geom.Point2D view)
        Get the dimensions of this XML document.
        Overrides:
        getDimension in class XMLObj
        Parameters:
        view - the viewport dimensions
        Returns:
        the dimensions of this SVG document
      • getSize

        public static java.awt.geom.Point2D getSize​(int size,
                                                    org.w3c.dom.Element svgRoot,
                                                    float ptmm)
        Get the size of the SVG root element.
        Parameters:
        size - the font size
        svgRoot - the svg root element
        ptmm - the pixel to millimeter conversion factor
        Returns:
        the size of the SVG document