public class GlyfSimpleDescript extends GlyfDescript
Modifier and Type | Field and Description |
---|---|
private int[] |
endPtsOfContours |
private byte[] |
flags |
private static org.apache.commons.logging.Log |
LOG
Log instance.
|
private int |
pointCount |
private short[] |
xCoordinates |
private short[] |
yCoordinates |
ON_CURVE, REPEAT, X_DUAL, X_SHORT_VECTOR, Y_DUAL, Y_SHORT_VECTOR
Constructor and Description |
---|
GlyfSimpleDescript(short numberOfContours,
TTFDataStream bais,
short x0)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getEndPtOfContours(int i)
Returns the index of the ending point of the given contour.
|
byte |
getFlags(int i)
Returns the flags of the given point.
|
int |
getPointCount()
Returns the number of points.
|
short |
getXCoordinate(int i)
Returns the x coordinate of the given point.
|
short |
getYCoordinate(int i)
Returns the y coordinate of the given point.
|
boolean |
isComposite()
Returns whether this point is a composite or not.
|
private void |
readCoords(int count,
TTFDataStream bais,
short x0)
The table is stored as relative values, but we'll store them as absolutes.
|
private void |
readFlags(int flagCount,
TTFDataStream bais)
The flags are run-length encoded.
|
getContourCount, getInstructions, readInstructions, resolve
private static final org.apache.commons.logging.Log LOG
private int[] endPtsOfContours
private byte[] flags
private short[] xCoordinates
private short[] yCoordinates
private final int pointCount
GlyfSimpleDescript(short numberOfContours, TTFDataStream bais, short x0) throws java.io.IOException
numberOfContours
- number of contoursbais
- the stream to be readx0
- the initial X-positionjava.io.IOException
- is thrown if something went wrongpublic int getEndPtOfContours(int i)
i
- the number of the contourpublic byte getFlags(int i)
GlyfDescript
. See also "Outline flags" in
The
'glyf' table in the TrueType Reference Manual.i
- the given pointpublic short getXCoordinate(int i)
i
- the given pointpublic short getYCoordinate(int i)
i
- the given pointpublic boolean isComposite()
public int getPointCount()
private void readCoords(int count, TTFDataStream bais, short x0) throws java.io.IOException
java.io.IOException
private void readFlags(int flagCount, TTFDataStream bais) throws java.io.IOException
java.io.IOException