Class GlyphPositioningTable.Anchor
java.lang.Object
org.apache.fop.complexscripts.fonts.GlyphPositioningTable.Anchor
- Direct Known Subclasses:
GlyphPositioningTable.MarkAnchor
- Enclosing class:
- GlyphPositioningTable
The
Anchor
class implements a anchor record, comprising an X,Y coordinate pair,
an optional anchor point index (or -1), and optional X or Y device tables (or null if absent).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
private final GlyphPositioningTable.DeviceTable
private final int
private final GlyphPositioningTable.DeviceTable
-
Constructor Summary
ConstructorsModifierConstructorDescriptionAnchor
(int x, int y) Instantiate an Anchor (format 1).Anchor
(int x, int y, int anchorPoint) Instantiate an Anchor (format 2).private
Anchor
(int x, int y, int anchorPoint, GlyphPositioningTable.DeviceTable xDevice, GlyphPositioningTable.DeviceTable yDevice) Anchor
(int x, int y, GlyphPositioningTable.DeviceTable xDevice, GlyphPositioningTable.DeviceTable yDevice) Instantiate an Anchor (format 3).protected
Instantiate an Anchor based on an existing anchor. -
Method Summary
-
Field Details
-
x
private final int x -
y
private final int y -
anchorPoint
private final int anchorPoint -
xDevice
-
yDevice
-
-
Constructor Details
-
Anchor
public Anchor(int x, int y) Instantiate an Anchor (format 1).- Parameters:
x
- the x coordinatey
- the y coordinate
-
Anchor
public Anchor(int x, int y, int anchorPoint) Instantiate an Anchor (format 2).- Parameters:
x
- the x coordinatey
- the y coordinateanchorPoint
- anchor index (or -1)
-
Anchor
public Anchor(int x, int y, GlyphPositioningTable.DeviceTable xDevice, GlyphPositioningTable.DeviceTable yDevice) Instantiate an Anchor (format 3).- Parameters:
x
- the x coordinatey
- the y coordinatexDevice
- the x device table (or null if not present)yDevice
- the y device table (or null if not present)
-
Anchor
Instantiate an Anchor based on an existing anchor.- Parameters:
a
- the existing anchor
-
Anchor
private Anchor(int x, int y, int anchorPoint, GlyphPositioningTable.DeviceTable xDevice, GlyphPositioningTable.DeviceTable yDevice)
-
-
Method Details
-
getX
public int getX()- Returns:
- the x coordinate
-
getY
public int getY()- Returns:
- the y coordinate
-
getAnchorPoint
public int getAnchorPoint()- Returns:
- the anchor point index (or -1 if not specified)
-
getXDevice
- Returns:
- the x device table (or null if not specified)
-
getYDevice
- Returns:
- the y device table (or null if not specified)
-
getAlignmentAdjustment
Obtain adjustment value required to align the specified anchor with this anchor.- Parameters:
a
- the anchor to align- Returns:
- the adjustment value needed to effect alignment
-
toString
-