Class GlyfCompositeDescript

  • All Implemented Interfaces:
    GlyphDescription

    public class GlyfCompositeDescript
    extends GlyfDescript
    Glyph description for composite glyphs. Composite glyphs are made up of one or more simple glyphs, usually with some sort of transformation applied to each. This class is based on code from Apache Batik a subproject of Apache XMLGraphics. see http://xmlgraphics.apache.org/batik/ for further details.
    • Field Detail

      • LOG

        private static final org.apache.commons.logging.Log LOG
        Log instance.
      • descriptions

        private final java.util.Map<java.lang.Integer,​GlyphDescription> descriptions
      • beingResolved

        private boolean beingResolved
      • resolved

        private boolean resolved
      • pointCount

        private int pointCount
      • contourCount

        private int contourCount
    • Constructor Detail

      • GlyfCompositeDescript

        GlyfCompositeDescript​(TTFDataStream bais,
                              GlyphTable glyphTable)
                       throws java.io.IOException
        Constructor.
        Parameters:
        bais - the stream to be read
        glyphTable - the Glyphtable containing all glyphs
        Throws:
        java.io.IOException - is thrown if something went wrong
    • Method Detail

      • getEndPtOfContours

        public int getEndPtOfContours​(int i)
        Returns the index of the ending point of the given contour.
        Parameters:
        i - the number of the contour
        Returns:
        the index of the ending point of the given contour
      • getFlags

        public byte getFlags​(int i)
        Returns the flags of the given point. To decode these bit flags, use the static elements of GlyfDescript. See also "Outline flags" in The 'glyf' table in the TrueType Reference Manual.
        Parameters:
        i - the given point
        Returns:
        the flags value for the given point
      • getXCoordinate

        public short getXCoordinate​(int i)
        Returns the x coordinate of the given point.
        Parameters:
        i - the given point
        Returns:
        the x coordinate value for the given point
      • getYCoordinate

        public short getYCoordinate​(int i)
        Returns the y coordinate of the given point.
        Parameters:
        i - the given point
        Returns:
        the y coordinate value for the given point
      • isComposite

        public boolean isComposite()
        Returns whether this point is a composite or not.
        Returns:
        true if this point is a composite
      • getPointCount

        public int getPointCount()
        Returns the number of points.
        Returns:
        the number of points
      • getComponentCount

        public int getComponentCount()
        Get number of components.
        Returns:
        the number of components
      • initDescriptions

        private void initDescriptions()