Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public Class GlyfCompositeComp

extends Object
Class Inheritance
Imports
java.io.IOException

This class is based on code from Apache Batik a subproject of Apache XMLGraphics. see http://xmlgraphics.apache.org/batik/ for further details.

Field Summary

Modifier and TypeField and Description
protected static final short
ARG_1_AND_2_ARE_WORDS

If set, the arguments are words; otherwise, they are bytes.

protected static final short
ARGS_ARE_XY_VALUES

If set, the arguments are xy values; otherwise they are points.

private final short
private final short
private int
private int
private final short
private final int
protected static final short
MORE_COMPONENTS

Indicates at least one more glyph after this one.

private int
private int
protected static final short
ROUND_XY_TO_GRID

If set, xy values are rounded to those of the closest grid lines.

private double
private double
protected static final 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 final short
WE_HAVE_A_SCALE

If set, there is a simple scale; otherwise, scale = 1.0.

protected static final short
WE_HAVE_A_TWO_BY_TWO

There is a 2 by2 transformation that will be used to scale the component.

protected static final short
WE_HAVE_AN_X_AND_Y_SCALE

The x direction will use a different scale from the y direction.

protected static final short
WE_HAVE_INSTRUCTIONS

Following the last component are instructions for the composite character.

private double
private int
private double
private int

Constructor Summary

AccessConstructor and Description
pack-priv
GlyfCompositeComp(TTFDataStream
the stream to be read
bais
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public short

Returns:

argument 1.
getArgument1
()

Returns argument 1.

public short

Returns:

argument 2.
getArgument2
()

Returns argument 2.

public int

Returns:

the index of the first contour.
getFirstContour
()

Returns the index of the first contour.

public int

Returns:

the first index.
getFirstIndex
()

Returns the first index.

public short

Returns:

the flags.
getFlags
()

Returns the flags of the glyph.

public int

Returns:

index of the first contour.
getGlyphIndex
()

Returns the index of the first contour.

public double

Returns:

the scale-01 value.
getScale01
()

Returns the scale-01 value.

public double

Returns:

the scale-10 value.
getScale10
()

Returns the scale-10 value.

public double

Returns:

the x-scaling value.
getXScale
()

Returns the x-scaling value.

public int

Returns:

the x-translation value.
getXTranslate
()

Returns the x-translation value.

public double

Returns:

the y-scaling value.
getYScale
()

Returns the y-scaling value.

public int

Returns:

the y-translation value.
getYTranslate
()

Returns the y-translation value.

public int

Returns:

The transformed x-coordinate
scaleX
(int
The x-coordinate of the point to transform
x
,
int
The y-coordinate of the point to transform
y
)

Transforms an x-coordinate of a point for this component.

public int

Returns:

The transformed y-coordinate
scaleY
(int
The x-coordinate of the point to transform
x
,
int
The y-coordinate of the point to transform
y
)

Transforms a y-coordinate of a point for this component.

protected void
setFirstContour(int
the index of the first contour
idx
)

Sets the index for the first contour.

protected void
setFirstIndex(int
the first index
idx
)

Sets the first index.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARG_1_AND_2_ARE_WORDSback to summary
protected static final short ARG_1_AND_2_ARE_WORDS

If set, the arguments are words; otherwise, they are bytes.

ARGS_ARE_XY_VALUESback to summary
protected static final short ARGS_ARE_XY_VALUES

If set, the arguments are xy values; otherwise they are points.

argument1back to summary
private final short argument1
argument2back to summary
private final short argument2
firstContourback to summary
private int firstContour
firstIndexback to summary
private int firstIndex
flagsback to summary
private final short flags
glyphIndexback to summary
private final int glyphIndex
MORE_COMPONENTSback to summary
protected static final short MORE_COMPONENTS

Indicates at least one more glyph after this one.

point1back to summary
private int point1
point2back to summary
private int point2
ROUND_XY_TO_GRIDback to summary
protected static final short ROUND_XY_TO_GRID

If set, xy values are rounded to those of the closest grid lines.

scale01back to summary
private double scale01
scale10back to summary
private double scale10
USE_MY_METRICSback to summary
protected static final 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.

WE_HAVE_A_SCALEback to summary
protected static final short WE_HAVE_A_SCALE

If set, there is a simple scale; otherwise, scale = 1.0.

WE_HAVE_A_TWO_BY_TWOback to summary
protected static final short WE_HAVE_A_TWO_BY_TWO

There is a 2 by2 transformation that will be used to scale the component.

WE_HAVE_AN_X_AND_Y_SCALEback to summary
protected static final short WE_HAVE_AN_X_AND_Y_SCALE

The x direction will use a different scale from the y direction.

WE_HAVE_INSTRUCTIONSback to summary
protected static final short WE_HAVE_INSTRUCTIONS

Following the last component are instructions for the composite character.

xscaleback to summary
private double xscale
xtranslateback to summary
private int xtranslate
yscaleback to summary
private double yscale
ytranslateback to summary
private int ytranslate

Constructor Detail

GlyfCompositeCompback to summary
pack-priv GlyfCompositeComp(TTFDataStream bais) throws IOException

Constructor.

Parameters
bais:TTFDataStream

the stream to be read

Exceptions
IOException:
is thrown if something went wrong

Method Detail

getArgument1back to summary
public short getArgument1()

Returns argument 1.

Returns:short

argument 1.

getArgument2back to summary
public short getArgument2()

Returns argument 2.

Returns:short

argument 2.

getFirstContourback to summary
public int getFirstContour()

Returns the index of the first contour.

Returns:int

the index of the first contour.

getFirstIndexback to summary
public int getFirstIndex()

Returns the first index.

Returns:int

the first index.

getFlagsback to summary
public short getFlags()

Returns the flags of the glyph.

Returns:short

the flags.

getGlyphIndexback to summary
public int getGlyphIndex()

Returns the index of the first contour.

Returns:int

index of the first contour.

getScale01back to summary
public double getScale01()

Returns the scale-01 value.

Returns:double

the scale-01 value.

getScale10back to summary
public double getScale10()

Returns the scale-10 value.

Returns:double

the scale-10 value.

getXScaleback to summary
public double getXScale()

Returns the x-scaling value.

Returns:double

the x-scaling value.

getXTranslateback to summary
public int getXTranslate()

Returns the x-translation value.

Returns:int

the x-translation value.

getYScaleback to summary
public double getYScale()

Returns the y-scaling value.

Returns:double

the y-scaling value.

getYTranslateback to summary
public int getYTranslate()

Returns the y-translation value.

Returns:int

the y-translation value.

scaleXback to summary
public int scaleX(int x, int y)

Transforms an x-coordinate of a point for this component.

Parameters
x:int

The x-coordinate of the point to transform

y:int

The y-coordinate of the point to transform

Returns:int

The transformed x-coordinate

scaleYback to summary
public int scaleY(int x, int y)

Transforms a y-coordinate of a point for this component.

Parameters
x:int

The x-coordinate of the point to transform

y:int

The y-coordinate of the point to transform

Returns:int

The transformed y-coordinate

setFirstContourback to summary
protected void setFirstContour(int idx)

Sets the index for the first contour.

Parameters
idx:int

the index of the first contour

setFirstIndexback to summary
protected void setFirstIndex(int idx)

Sets the first index.

Parameters
idx:int

the first index