com.sun.pdfview.font.ttf
Class GlyfSimple
public
class
GlyfSimple
extends Glyf
A single simple glyph in a pdf font.
Method Summary |
short | getContourEndPoint(int index)
Get the end point of a given contour |
ByteBuffer | getData()
Get the data in this glyf as a byte buffer. |
byte | getFlag(int pointIndex)
Get a given flag |
byte | getInstruction(int index)
Get a given instruction |
short | getLength()
Get the length of this glyf. |
short | getNumInstructions()
Get the number of instructions |
short | getNumPoints()
Get the number of points in the glyf |
short | getXCoord(int pointIndex)
Get a given x coordinate |
short | getYCoord(int pointIndex)
Get a given y coordinate |
boolean | onCurve(int pointIndex)
Determine whether the given point is on the curve |
protected boolean | repeat(int pointIndex)
Determine whether this flag repeats |
protected void | setContourEndPoints(short[] contourEndPts)
Set the number of contours in this glyf |
void | setData(ByteBuffer data)
Set the data for this glyf. |
protected void | setFlags(byte[] flags)
Set the flags |
protected void | setInstructions(byte[] instructions)
Set the instructions |
protected void | setXCoords(short[] xCoords)
Set the x coordinates |
protected void | setYCoords(short[] yCoords)
Set the x coordinates |
protected boolean | xIsByte(int pointIndex)
Determine whether the x value for the given point is byte or short.
|
protected boolean | xIsSame(int pointIndex)
Determine whether the x value for the given point is the same as
the previous value. |
protected boolean | yIsByte(int pointIndex)
Determine whether the x value for the given point is byte or short.
|
protected boolean | yIsSame(int pointIndex)
Determine whether the y value for the given point is the same as
the previous value. |
protected GlyfSimple()
Creates a new instance of a simple glyf
public short getContourEndPoint(int index)
Get the end point of a given contour
public ByteBuffer getData()
Get the data in this glyf as a byte buffer. Return the basic
glyf data only, since there is no specific data. This method returns
the data un-flipped, so subclasses can simply append to the allocated
buffer.
public byte getFlag(int pointIndex)
Get a given flag
public byte getInstruction(int index)
Get a given instruction
public short getLength()
Get the length of this glyf.
public short getNumInstructions()
Get the number of instructions
public short getNumPoints()
Get the number of points in the glyf
public short getXCoord(int pointIndex)
Get a given x coordinate
public short getYCoord(int pointIndex)
Get a given y coordinate
public boolean onCurve(int pointIndex)
Determine whether the given point is on the curve
protected boolean repeat(int pointIndex)
Determine whether this flag repeats
protected void setContourEndPoints(short[] contourEndPts)
Set the number of contours in this glyf
public void setData(ByteBuffer data)
Set the data for this glyf.
protected void setFlags(byte[] flags)
Set the flags
protected void setInstructions(byte[] instructions)
Set the instructions
protected void setXCoords(short[] xCoords)
Set the x coordinates
protected void setYCoords(short[] yCoords)
Set the x coordinates
protected boolean xIsByte(int pointIndex)
Determine whether the x value for the given point is byte or short.
If true, it is a byte, if false it is a short
protected boolean xIsSame(int pointIndex)
Determine whether the x value for the given point is the same as
the previous value.
protected boolean yIsByte(int pointIndex)
Determine whether the x value for the given point is byte or short.
If true, it is a byte, if false it is a short
protected boolean yIsSame(int pointIndex)
Determine whether the y value for the given point is the same as
the previous value.