public abstract class GFXDriver extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ACTIVE |
static int |
CAP_PIX_HEIGHT |
static int |
CAP_PIX_WIDTH |
static int |
CAP_REAL_HEIGHT |
static int |
CAP_REAL_WIDTH |
static int |
CAP_TYPE |
static int |
DRAW_2D |
static int |
DRAW_3D |
static int |
DRAW_WELL |
static int |
INACTIVE |
static int |
MAPPING_FULL |
static int |
MAPPING_LEGACY |
static int |
MAPPING_SUPPRESS
Character to glyph mapping level required by the driver.
|
List<com.adobe.xfa.gfx.GFXDriver.AnglePair> |
moAngleStack |
List<Rect> |
moClipStack |
static int |
MODE_OPAQUE |
static int |
MODE_TRANSPARENT |
List<CoordPair> |
moOffsetStack |
static int |
PUSHED |
static int |
TYPE_PRINTER |
static int |
TYPE_SCREEN |
Modifier and Type | Method and Description |
---|---|
abstract void |
absFillRect(Rect oRect,
int eDrawMode) |
void |
absGlyphs(int[] pnGlyphs,
int length) |
void |
absLine(CoordPair oStart,
CoordPair oEnd,
int eDrawMode) |
abstract void |
absLine(CoordPair oEnd,
int eDrawMode) |
CoordPair |
absPosition() |
void |
absPosition(CoordPair oStart) |
abstract void |
absText(String oText,
int eDrawMode) |
Angle |
angle() |
Angle |
angle(boolean bRelative) |
UnitSpan |
charSpacing()
Returns the character spacing currently in effect for this driver.
|
void |
charSpacing(UnitSpan oNewSpacing)
Set a new character spacing for subsequent text output.
|
boolean |
charSpacingSupported()
Query whether this driver implementation supports character spacing.
|
void |
clearStacks() |
Rect |
clipRect() |
Rect |
clipRect(boolean bRelative) |
int |
devH(UnitSpan oHeight) |
GFXDevPoint |
devPoint(CoordPair oPoint) |
GFXDevRect |
devRect(Rect oRect) |
UnitSpan |
devUnitX() |
UnitSpan |
devUnitY() |
int |
devW(UnitSpan oWidth) |
int |
devX(UnitSpan oX) |
int |
devY(UnitSpan oY) |
int |
dotsPerInch() |
boolean |
draw3dEffects() |
void |
draw3dEffects(boolean b3dEffects) |
GFXEnv |
env() |
GFXFillAttr |
fillAttr() |
void |
fillAttr(GFXFillAttr poNewAttr) |
void |
fit(double dScale,
CoordPair oOrigin,
int nFit) |
FontInstance |
fontInstance() |
void |
fontInstance(FontInstance poNewFont) |
int |
getMappingLevel()
Return the mapping required by the driver.
|
int |
glyphOrientation() |
void |
glyphOrientation(int eNewGlyphOrientation) |
abstract int |
height() |
UnitSpan |
heightInUnits() |
abstract boolean |
interactive() |
GFXLineAttr |
lineAttr() |
void |
lineAttr(GFXLineAttr poNewAttr) |
void |
mapChars(int nIndex,
int nLength)
Legacy character/glyph mapping.
|
void |
mapGlyphs(GFXMappingList oMappings,
boolean bIsRTL)
Full character/glyph mapping.
|
int |
mode() |
void |
mode(int eNewMode) |
CoordPair |
nonPrintOffset() |
CoordPair |
offset() |
CoordPair |
offset(boolean bRelative) |
CoordPair |
offsetPoint(CoordPair oPoint) |
void |
paraHint() |
void |
popAngle() |
void |
popClipRect() |
void |
popOffset() |
void |
popRenderContext()
Restore the rendering context.
|
void |
pushAngle(boolean bRelative,
Angle oAngle,
boolean bOffsetPoint,
CoordPair oRotationPoint) |
void |
pushClipRect(boolean bRelative,
Rect oClipRect) |
void |
pushOffset(boolean bRelative,
CoordPair oOffset) |
void |
pushRenderContext(int[] pcText,
int pnCharIndex)
Indicates the caller needs to perform some specific rendering without
losing the overall rendering context.
|
void |
relFillRect(Rect oRect) |
void |
relFillRect(Rect oRect,
int eDrawMode) |
void |
relGlyphs(int[] pnGlyphs,
int length) |
void |
relLine(CoordPair oStart,
CoordPair oEnd) |
void |
relLine(CoordPair oStart,
CoordPair oEnd,
int eDrawMode) |
void |
relLine(CoordPair oEnd,
int eDrawMode) |
CoordPair |
relPosition() |
void |
relPosition(CoordPair oStart) |
void |
relText(String oText) |
void |
relText(String oText,
int eDrawMode) |
void |
resolutionChanged() |
CoordPair |
rotatePoint(CoordPair oPoint) |
CoordPair |
rotationPoint(boolean bRelative) |
double |
scale() |
void |
setUnicodeChars(int[] text)
Set the Unicode characters that are about to be rendered by
subsequent calls to the driver.
|
GFXTextAttr |
textAttr() |
void |
textAttr(GFXTextAttr poNewAttr) |
UnitSpan |
unitH(int lHeight) |
CoordPair |
unitPoint(int lX,
int lY) |
Rect |
unitRect(int lLeft,
int lTop,
int lRight,
int lBottom) |
UnitSpan |
unitW(int lWidth) |
UnitSpan |
unitX(int lX) |
UnitSpan |
unitY(int lY) |
Rect |
visibleArea() |
abstract int |
width() |
UnitSpan |
widthInUnits() |
UnitSpan |
wordSpacing()
Returns the word spacing currently in effect for this driver.
|
void |
wordSpacing(UnitSpan oNewSpacing)
Set a new word spacing for subsequent text output.
|
boolean |
wordSpacingSupported()
Query whether this driver implementation supports word spacing.
|
public static final int MODE_OPAQUE
public static final int MODE_TRANSPARENT
public static final int TYPE_PRINTER
public static final int TYPE_SCREEN
public static final int CAP_TYPE
public static final int CAP_PIX_WIDTH
public static final int CAP_PIX_HEIGHT
public static final int CAP_REAL_WIDTH
public static final int CAP_REAL_HEIGHT
public static final int DRAW_2D
public static final int DRAW_3D
public static final int DRAW_WELL
public static final int ACTIVE
public static final int INACTIVE
public static final int PUSHED
public static final int MAPPING_SUPPRESS
Some driver implementations do more than rendering; they may need to reconstiture the original text and understand how it relates to the rendered glyphs. This enumeration allows a driver to indicate what sort of character/glyph mapping it requires. If the caller is using the driver to render text, it must provide mapping information in accordance with what the driver needs.
public static final int MAPPING_FULL
public static final int MAPPING_LEGACY
public List<com.adobe.xfa.gfx.GFXDriver.AnglePair> moAngleStack
public GFXDriver(GFXEnv env)
public GFXEnv env()
public int devW(UnitSpan oWidth)
public int devH(UnitSpan oHeight)
public GFXDevPoint devPoint(CoordPair oPoint)
public GFXDevRect devRect(Rect oRect)
public int devX(UnitSpan oX)
public int devY(UnitSpan oY)
public UnitSpan devUnitX()
public UnitSpan devUnitY()
public void fit(double dScale, CoordPair oOrigin, int nFit)
public double scale()
public UnitSpan unitW(int lWidth)
public UnitSpan unitH(int lHeight)
public CoordPair unitPoint(int lX, int lY)
public Rect unitRect(int lLeft, int lTop, int lRight, int lBottom)
public UnitSpan unitX(int lX)
public UnitSpan unitY(int lY)
public int mode()
public void mode(int eNewMode)
public GFXLineAttr lineAttr()
public void lineAttr(GFXLineAttr poNewAttr)
public GFXFillAttr fillAttr()
public void fillAttr(GFXFillAttr poNewAttr)
public GFXTextAttr textAttr()
public void textAttr(GFXTextAttr poNewAttr)
public FontInstance fontInstance()
public void fontInstance(FontInstance poNewFont)
public int glyphOrientation()
public void glyphOrientation(int eNewGlyphOrientation)
public UnitSpan charSpacing()
Note that not all driver implementations support character spacing.
public void charSpacing(UnitSpan oNewSpacing)
Note that not all driver implementations support character spacing.
oNewSpacing
- - New character spacing value. Negative values
are allowed.public boolean charSpacingSupported()
If it does not, there is no point in calling the CharSpacing() overloads. AXTE uses the result of this method to determine whether a text run with a spacing override must be rendered as individual glyphs or can be put out as a run.
public UnitSpan wordSpacing()
Note that not all driver implementations support word spacing.
public void wordSpacing(UnitSpan oNewSpacing)
Note that not all driver implementations support word spacing. Note also that word and character spacing support are independent of each other. A driver may support one, the other, both or neither.
oNewSpacing
- - New word spacing value. Negative values are
allowed.public boolean wordSpacingSupported()
If it does not, there is no point in calling the WordSpacing() overloads.
public void pushOffset(boolean bRelative, CoordPair oOffset)
public void popOffset()
public CoordPair offset(boolean bRelative)
public CoordPair offset()
public void pushAngle(boolean bRelative, Angle oAngle, boolean bOffsetPoint, CoordPair oRotationPoint)
public void popAngle()
public Angle angle(boolean bRelative)
public Angle angle()
public CoordPair rotationPoint(boolean bRelative)
public void pushClipRect(boolean bRelative, Rect oClipRect)
public void popClipRect()
public Rect clipRect(boolean bRelative)
public Rect clipRect()
public void clearStacks()
public CoordPair relPosition()
public void relPosition(CoordPair oStart)
public void relLine(CoordPair oEnd, int eDrawMode)
public void relFillRect(Rect oRect, int eDrawMode)
public void relFillRect(Rect oRect)
public void relText(String oText, int eDrawMode)
public void relText(String oText)
public void relGlyphs(int[] pnGlyphs, int length)
public CoordPair absPosition()
public void absPosition(CoordPair oStart)
public abstract void absLine(CoordPair oEnd, int eDrawMode)
public abstract void absFillRect(Rect oRect, int eDrawMode)
public abstract void absText(String oText, int eDrawMode)
public void absGlyphs(int[] pnGlyphs, int length)
public void setUnicodeChars(int[] text)
If the driver requires any sort of mapping, the caller must provide the raw Unicode content through this call before calling any of the text rendering methods RelText(), AbsText(), RelGlyphs() or AbsGlyphs() to render that content.
The caller typically calls this method once for each "line" of text and then makes one or more calls to the text rendering methods to render the text of the line. If the driver requires mapping, each text rendering call must be preceded by an appropriate call, in order to determine how the rendering run maps to the Unicode content.
text
- - Unicode text content, UTF32 format.public void pushRenderContext(int[] pcText, int pnCharIndex)
The SetUnicodeChars() method establishes a context that the driver may need for subsequent rendering and mapping calls. There are situations where that context needs to be put on hold, while the caller goes off and performs some other sort of rendering, before coming back to the context originally set by SetUnicodeChars().
In particular, consider the case where a tab leader is filled with a sequence of repeating glyphs. The caller will call SetUnicodeChars() with the Unicode content of the complete line, which contains text and tab characters. In filling the leader for a single tab, it will push a new context, with the text used to fill the tab leader. After rendering the tab leader, it will pop the context back to that of the original line.
pcText
- - New Unicode text context to establish.pnCharIndex
- - (optional) Index of the character in the parent
context that led to this new context. For example, in the case of
tab leaders, this would be the index of a tab character. A future
overload may allow for a more elaborate mapping specification.public void popRenderContext()
public void mapChars(int nIndex, int nLength)
If the driver needs legacy mapping, the caller must preceed each call to a text rendering method with a call to this method. Legacy mapping can describe only simple character/glyph relationships:
If the driver uses legacy mapping, the caller must break each ligature and each RTL glyph out into its own run.
public void mapGlyphs(GFXMappingList oMappings, boolean bIsRTL)
If the driver needs legacy mapping, the caller must preceed each call to a text rendering method with a call to this method. Full mapping supports 1:1, N:1, 1:M and N:M mappings, as well as mappings that involve non-contiguous runs of Unicode content and glyph output.
oMappings
- - Description of the mappings for the subsequent
text rendering call. The Unicode character indexes in the mappings
are relative to the line's text passed in SetUnicodeChars(). The
glyph indexes are zero-based, relative to the glyphs in the next text
rendering call.bIsRTL
- - True if the subsequent run represents RTL text; FALSE
for LTR text.public int getMappingLevel()
public int dotsPerInch()
public abstract int height()
public abstract int width()
public abstract boolean interactive()
public Rect visibleArea()
public CoordPair nonPrintOffset()
public void paraHint()
public void resolutionChanged()
public UnitSpan heightInUnits()
public UnitSpan widthInUnits()
public boolean draw3dEffects()
public void draw3dEffects(boolean b3dEffects)
Copyright © 2010 - 2020 Adobe. All Rights Reserved