public class PSTextPainter extends NativeTextPainter
TextNode.
This class draws the text directly using PostScript text operators so
the text is not drawn using shapes which makes the PS files larger.
The text runs are split into smaller text runs that can be bundles in single calls of the xshow, yshow or xyshow operators. For outline text, the charpath operator is used.
font, fontFamilyResolver, fontInfo, log, tpiADJUST_ALL, ADJUST_SPACING, ALT_GLYPH_HANDLER, ANCHOR_TYPE, BIDI_LEVEL, FLOW_PARAGRAPH, FLOW_REGIONS, GVT_FONT, GVT_FONTS, PAINT_INFO, singleton, TEXT_COMPOUND_ID, TEXTPATH, WRITING_MODE, WRITING_MODE_RTL, WRITING_MODE_TTB, XPOS, YPOS| Constructor and Description |
|---|
PSTextPainter(FontInfo fontInfo)
Create a new PS text painter with the given font information.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginTextObject() |
protected void |
clip(java.awt.Shape shape) |
protected void |
endTextObject() |
protected boolean |
isSupported(java.awt.Graphics2D g2d)
Indicates whether the given
Graphics2D instance if compatible with this text painter
implementation. |
protected void |
positionGlyph(java.awt.geom.Point2D prevPos,
java.awt.geom.Point2D glyphPos,
boolean reposition) |
protected void |
preparePainting(java.awt.Graphics2D g2d) |
protected void |
restoreGraphicsState() |
protected void |
saveGraphicsState() |
protected void |
setInitialTransform(java.awt.geom.AffineTransform transform) |
protected void |
writeGlyph(char glyph,
java.awt.geom.AffineTransform localTransform) |
collectCharacters, computeTextRuns, getFontFamilyResolver, getTextLayoutFactory, getTextRunBoundaryAttributes, logCharacter, logTextRun, paintTextRun, paintTextRuns, reorderTextRuns, writeGlyphsadjustChunkOffsets, computeTextRuns, createModifiedACIForFontMatching, getBounds2D, getDecorationOutline, getDecorationStrokeOutline, getHighlightShape, getInstance, getMark, getOutline, getSelected, getTextChunk, getTextChunkACIs, getTextRuns, hitTest, paint, paintDecorations, printAttrs, selectFirst, selectLastpublic PSTextPainter(FontInfo fontInfo)
fontInfo - the font collectionprotected boolean isSupported(java.awt.Graphics2D g2d)
Graphics2D instance if compatible with this text painter
implementation.isSupported in class NativeTextPainterg2d - the instance to checkprotected void preparePainting(java.awt.Graphics2D g2d)
preparePainting in class NativeTextPainterprotected void saveGraphicsState()
throws java.io.IOException
saveGraphicsState in class NativeTextPainterjava.io.IOExceptionprotected void restoreGraphicsState()
throws java.io.IOException
restoreGraphicsState in class NativeTextPainterjava.io.IOExceptionprotected void setInitialTransform(java.awt.geom.AffineTransform transform)
throws java.io.IOException
setInitialTransform in class NativeTextPainterjava.io.IOExceptionprotected void clip(java.awt.Shape shape)
throws java.io.IOException
clip in class NativeTextPainterjava.io.IOExceptionprotected void beginTextObject()
throws java.io.IOException
beginTextObject in class NativeTextPainterjava.io.IOExceptionprotected void endTextObject()
throws java.io.IOException
endTextObject in class NativeTextPainterjava.io.IOExceptionprotected void positionGlyph(java.awt.geom.Point2D prevPos,
java.awt.geom.Point2D glyphPos,
boolean reposition)
positionGlyph in class NativeTextPainterprotected void writeGlyph(char glyph,
java.awt.geom.AffineTransform localTransform)
throws java.io.IOException
writeGlyph in class NativeTextPainterjava.io.IOExceptionCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.