Class GlyphPositioningTable.Value
java.lang.Object
org.docx4j.fonts.fop.complexscripts.fonts.GlyphPositioningTable.Value
- Enclosing class:
- GlyphPositioningTable
public static class GlyphPositioningTable.Value
extends java.lang.Object
The
Value class implements a positioning value record, comprising placement
and advancement information in X and Y axes, and optionally including device data used to
perform device (grid-fitted) specific fine grain adjustments.-
Field Summary
Fields Modifier and Type Field Description static intIDX_X_ADVANCEX_ADVANCE value index (within adjustments arrays)static intIDX_X_PLACEMENTX_PLACEMENT value index (within adjustments arrays)static intIDX_Y_ADVANCEY_ADVANCE value index (within adjustments arrays)static intIDX_Y_PLACEMENTY_PLACEMENT value index (within adjustments arrays)static intX_ADVANCEX_ADVANCE value format flagstatic intX_ADVANCE_DEVICEX_ADVANCE_DEVICE value format flagstatic intX_PLACEMENTX_PLACEMENT value format flagstatic intX_PLACEMENT_DEVICEX_PLACEMENT_DEVICE value format flagstatic intY_ADVANCEY_ADVANCE value format flagstatic intY_ADVANCE_DEVICEY_ADVANCE_DEVICE value format flagstatic intY_PLACEMENTY_PLACEMENT value format flagstatic intY_PLACEMENT_DEVICEY_PLACEMENT_DEVICE value format flag -
Constructor Summary
Constructors Constructor Description Value(int xPlacement, int yPlacement, int xAdvance, int yAdvance, GlyphPositioningTable.DeviceTable xPlaDevice, GlyphPositioningTable.DeviceTable yPlaDevice, GlyphPositioningTable.DeviceTable xAdvDevice, GlyphPositioningTable.DeviceTable yAdvDevice)Instantiate a Value. -
Method Summary
Modifier and Type Method Description booleanadjust(int[] adjustments, int fontSize)Apply value to adjustments using font size for device table adjustments.voidadjust(int xPlacement, int yPlacement, int xAdvance, int yAdvance)Apply value to specific adjustments to without use of device table adjustments.intgetXAdvance()GlyphPositioningTable.DeviceTablegetXAdvDevice()intgetXPlacement()GlyphPositioningTable.DeviceTablegetXPlaDevice()intgetYAdvance()GlyphPositioningTable.DeviceTablegetYAdvDevice()intgetYPlacement()GlyphPositioningTable.DeviceTablegetYPlaDevice()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
X_PLACEMENT
public static final int X_PLACEMENTX_PLACEMENT value format flag- See Also:
- Constant Field Values
-
Y_PLACEMENT
public static final int Y_PLACEMENTY_PLACEMENT value format flag- See Also:
- Constant Field Values
-
X_ADVANCE
public static final int X_ADVANCEX_ADVANCE value format flag- See Also:
- Constant Field Values
-
Y_ADVANCE
public static final int Y_ADVANCEY_ADVANCE value format flag- See Also:
- Constant Field Values
-
X_PLACEMENT_DEVICE
public static final int X_PLACEMENT_DEVICEX_PLACEMENT_DEVICE value format flag- See Also:
- Constant Field Values
-
Y_PLACEMENT_DEVICE
public static final int Y_PLACEMENT_DEVICEY_PLACEMENT_DEVICE value format flag- See Also:
- Constant Field Values
-
X_ADVANCE_DEVICE
public static final int X_ADVANCE_DEVICEX_ADVANCE_DEVICE value format flag- See Also:
- Constant Field Values
-
Y_ADVANCE_DEVICE
public static final int Y_ADVANCE_DEVICEY_ADVANCE_DEVICE value format flag- See Also:
- Constant Field Values
-
IDX_X_PLACEMENT
public static final int IDX_X_PLACEMENTX_PLACEMENT value index (within adjustments arrays)- See Also:
- Constant Field Values
-
IDX_Y_PLACEMENT
public static final int IDX_Y_PLACEMENTY_PLACEMENT value index (within adjustments arrays)- See Also:
- Constant Field Values
-
IDX_X_ADVANCE
public static final int IDX_X_ADVANCEX_ADVANCE value index (within adjustments arrays)- See Also:
- Constant Field Values
-
IDX_Y_ADVANCE
public static final int IDX_Y_ADVANCEY_ADVANCE value index (within adjustments arrays)- See Also:
- Constant Field Values
-
-
Constructor Details
-
Value
public Value(int xPlacement, int yPlacement, int xAdvance, int yAdvance, GlyphPositioningTable.DeviceTable xPlaDevice, GlyphPositioningTable.DeviceTable yPlaDevice, GlyphPositioningTable.DeviceTable xAdvDevice, GlyphPositioningTable.DeviceTable yAdvDevice)Instantiate a Value.- Parameters:
xPlacement- the x placement or zeroyPlacement- the y placement or zeroxAdvance- the x advance or zeroyAdvance- the y advance or zeroxPlaDevice- the x placement device table or nullyPlaDevice- the y placement device table or nullxAdvDevice- the x advance device table or nullyAdvDevice- the y advance device table or null
-
-
Method Details
-
getXPlacement
public int getXPlacement()- Returns:
- the x placement
-
getYPlacement
public int getYPlacement()- Returns:
- the y placement
-
getXAdvance
public int getXAdvance()- Returns:
- the x advance
-
getYAdvance
public int getYAdvance()- Returns:
- the y advance
-
getXPlaDevice
- Returns:
- the x placement device table
-
getYPlaDevice
- Returns:
- the y placement device table
-
getXAdvDevice
- Returns:
- the x advance device table
-
getYAdvDevice
- Returns:
- the y advance device table
-
adjust
public void adjust(int xPlacement, int yPlacement, int xAdvance, int yAdvance)Apply value to specific adjustments to without use of device table adjustments.- Parameters:
xPlacement- the x placement or zeroyPlacement- the y placement or zeroxAdvance- the x advance or zeroyAdvance- the y advance or zero
-
adjust
public boolean adjust(int[] adjustments, int fontSize)Apply value to adjustments using font size for device table adjustments.- Parameters:
adjustments- array of four integers containing X,Y placement and X,Y advance adjustmentsfontSize- font size for device table adjustments- Returns:
- true if some adjustment was made
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-