public class GlyfCompositeComp extends Object
Modifier and Type | Field and Description |
---|---|
protected static short |
ARG_1_AND_2_ARE_WORDS
If set, the arguments are words; otherwise, they are bytes.
|
protected static short |
ARGS_ARE_XY_VALUES
If set, the arguments are xy values; otherwise they are points.
|
protected static short |
MORE_COMPONENTS
Indicates at least one more glyph after this one.
|
protected static short |
ROUND_XY_TO_GRID
If set, xy values are rounded to those of the closest grid lines.
|
protected static short |
USE_MY_METRICS
If set, this forces the aw and lsb (and rsb) for the composite to be equal to those from this original glyph.
|
protected static short |
WE_HAVE_A_SCALE
If set, there is a simple scale; otherwise, scale = 1.0.
|
protected static short |
WE_HAVE_A_TWO_BY_TWO
There is a 2 by2 transformation that will be used to scale the component.
|
protected static short |
WE_HAVE_AN_X_AND_Y_SCALE
The x direction will use a different scale from the y direction.
|
protected static short |
WE_HAVE_INSTRUCTIONS
Following the last component are instructions for the composite character.
|
Modifier | Constructor and Description |
---|---|
protected |
GlyfCompositeComp(org.apache.fontbox.ttf.TTFDataStream bais)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
short |
getArgument1()
Returns argument 1.
|
short |
getArgument2()
Returns argument 2.
|
int |
getFirstContour()
Returns the index of the first contour.
|
int |
getFirstIndex()
Returns the first index.
|
short |
getFlags()
Returns the flags of the glyph.
|
int |
getGlyphIndex()
Returns the index of the first contour.
|
double |
getScale01()
Returns the scale-01 value.
|
double |
getScale10()
Returns the scale-10 value.
|
double |
getXScale()
Returns the x-scaling value.
|
int |
getXTranslate()
Returns the x-translation value.
|
double |
getYScale()
Returns the y-scaling value.
|
int |
getYTranslate()
Returns the y-translation value.
|
int |
scaleX(int x,
int y)
Transforms an x-coordinate of a point for this component.
|
int |
scaleY(int x,
int y)
Transforms a y-coordinate of a point for this component.
|
void |
setFirstContour(int idx)
Sets the index for the first contour.
|
void |
setFirstIndex(int idx)
Sets the first index.
|
protected static final short ARG_1_AND_2_ARE_WORDS
protected static final short ARGS_ARE_XY_VALUES
protected static final short ROUND_XY_TO_GRID
protected static final short WE_HAVE_A_SCALE
protected static final short MORE_COMPONENTS
protected static final short WE_HAVE_AN_X_AND_Y_SCALE
protected static final short WE_HAVE_A_TWO_BY_TWO
protected static final short WE_HAVE_INSTRUCTIONS
protected static final short USE_MY_METRICS
protected GlyfCompositeComp(org.apache.fontbox.ttf.TTFDataStream bais) throws IOException
bais
- the stream to be readIOException
- is thrown if something went wrongpublic void setFirstIndex(int idx)
idx
- the first indexpublic int getFirstIndex()
public void setFirstContour(int idx)
idx
- the index of the first contourpublic int getFirstContour()
public short getArgument1()
public short getArgument2()
public short getFlags()
public int getGlyphIndex()
public double getScale01()
public double getScale10()
public double getXScale()
public double getYScale()
public int getXTranslate()
public int getYTranslate()
public int scaleX(int x, int y)
x
- The x-coordinate of the point to transformy
- The y-coordinate of the point to transformpublic int scaleY(int x, int y)
x
- The x-coordinate of the point to transformy
- The y-coordinate of the point to transformCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.