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(Shape shape) |
protected void |
endTextObject() |
protected boolean |
isSupported(Graphics2D g2d)
Indicates whether the given
Graphics2D instance if compatible with this text painter
implementation. |
protected void |
positionGlyph(Point2D prevPos,
Point2D glyphPos,
boolean reposition) |
protected void |
preparePainting(Graphics2D g2d) |
protected void |
restoreGraphicsState() |
protected void |
saveGraphicsState() |
protected void |
setInitialTransform(AffineTransform transform) |
protected void |
writeGlyph(char glyph,
AffineTransform localTransform) |
collectCharacters, computeTextRuns, getFontFamilyResolver, getLocalTransform, 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(Graphics2D g2d)
Graphics2D instance if compatible with this text painter
implementation.isSupported in class NativeTextPainterg2d - the instance to checkprotected void preparePainting(Graphics2D g2d)
preparePainting in class NativeTextPainterprotected void saveGraphicsState()
throws IOException
saveGraphicsState in class NativeTextPainterIOExceptionprotected void restoreGraphicsState()
throws IOException
restoreGraphicsState in class NativeTextPainterIOExceptionprotected void setInitialTransform(AffineTransform transform) throws IOException
setInitialTransform in class NativeTextPainterIOExceptionprotected void clip(Shape shape) throws IOException
clip in class NativeTextPainterIOExceptionprotected void beginTextObject()
throws IOException
beginTextObject in class NativeTextPainterIOExceptionprotected void endTextObject()
throws IOException
endTextObject in class NativeTextPainterIOExceptionprotected void positionGlyph(Point2D prevPos, Point2D glyphPos, boolean reposition)
positionGlyph in class NativeTextPainterprotected void writeGlyph(char glyph,
AffineTransform localTransform)
throws IOException
writeGlyph in class NativeTextPainterIOExceptionCopyright © 2025 Apache Software Foundation. All rights reserved.