public abstract class NativeTextPainter
extends org.apache.batik.bridge.StrokingTextPainter
| Modifier and Type | Field and Description |
|---|---|
protected Font |
font |
protected org.apache.batik.bridge.FontFamilyResolver |
fontFamilyResolver |
protected FontInfo |
fontInfo
the font collection
|
protected static org.apache.commons.logging.Log |
log
the logger for this class
|
protected org.apache.batik.gvt.text.TextPaintInfo |
tpi |
ADJUST_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 |
|---|
NativeTextPainter(FontInfo fontInfo)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
beginTextObject() |
protected abstract void |
clip(java.awt.Shape clip) |
protected java.lang.CharSequence |
collectCharacters(java.text.AttributedCharacterIterator runaci)
Collects all characters from an
AttributedCharacterIterator. |
java.util.List |
computeTextRuns(org.apache.batik.bridge.TextNode node,
java.text.AttributedCharacterIterator nodeACI,
java.text.AttributedCharacterIterator[] chunkACIs) |
protected abstract void |
endTextObject() |
protected org.apache.batik.bridge.FontFamilyResolver |
getFontFamilyResolver() |
protected org.apache.batik.bridge.TextLayoutFactory |
getTextLayoutFactory() |
protected java.util.Set |
getTextRunBoundaryAttributes() |
protected abstract boolean |
isSupported(java.awt.Graphics2D g2d)
Indicates whether the given
Graphics2D instance if compatible with this text painter
implementation. |
protected void |
logCharacter(char ch,
org.apache.batik.bridge.TextSpanLayout layout,
int index,
boolean visibleChar) |
protected void |
logTextRun(org.apache.batik.bridge.StrokingTextPainter.TextRun textRun) |
protected void |
paintTextRun(org.apache.batik.bridge.StrokingTextPainter.TextRun textRun,
java.awt.Graphics2D g2d)
Paints a single text run.
|
protected void |
paintTextRuns(java.util.List textRuns,
java.awt.Graphics2D g2d) |
protected abstract void |
positionGlyph(java.awt.geom.Point2D prevPos,
java.awt.geom.Point2D glyphPos,
boolean reposition) |
protected abstract void |
preparePainting(java.awt.Graphics2D g2d) |
protected java.util.List |
reorderTextRuns(org.apache.batik.bridge.StrokingTextPainter.TextChunk chunk,
java.util.List runs) |
protected abstract void |
restoreGraphicsState() |
protected abstract void |
saveGraphicsState() |
protected abstract void |
setInitialTransform(java.awt.geom.AffineTransform transform) |
protected abstract void |
writeGlyph(char glyph,
java.awt.geom.AffineTransform transform) |
protected void |
writeGlyphs(FOPGVTGlyphVector gv,
java.awt.geom.GeneralPath debugShapes) |
adjustChunkOffsets, computeTextRuns, createModifiedACIForFontMatching, getBounds2D, getDecorationOutline, getDecorationStrokeOutline, getHighlightShape, getInstance, getMark, getOutline, getSelected, getTextChunk, getTextChunkACIs, getTextRuns, hitTest, paint, paintDecorations, printAttrs, selectFirst, selectLastprotected static final org.apache.commons.logging.Log log
protected final FontInfo fontInfo
protected final org.apache.batik.bridge.FontFamilyResolver fontFamilyResolver
protected Font font
protected org.apache.batik.gvt.text.TextPaintInfo tpi
public NativeTextPainter(FontInfo fontInfo)
fontInfo - the font collectionprotected abstract boolean isSupported(java.awt.Graphics2D g2d)
Graphics2D instance if compatible with this text painter
implementation.g2d - the instance to checkprotected final void paintTextRun(org.apache.batik.bridge.StrokingTextPainter.TextRun textRun,
java.awt.Graphics2D g2d)
throws java.io.IOException
textRun - the text rung2d - the target Graphics2D instancejava.io.IOException - if an I/O error occurs while rendering the textprotected void writeGlyphs(FOPGVTGlyphVector gv, java.awt.geom.GeneralPath debugShapes) throws java.io.IOException
java.io.IOExceptionprotected void paintTextRuns(java.util.List textRuns,
java.awt.Graphics2D g2d)
paintTextRuns in class org.apache.batik.bridge.StrokingTextPainterprotected java.lang.CharSequence collectCharacters(java.text.AttributedCharacterIterator runaci)
AttributedCharacterIterator.runaci - the character iteratorpublic java.util.List computeTextRuns(org.apache.batik.bridge.TextNode node,
java.text.AttributedCharacterIterator nodeACI,
java.text.AttributedCharacterIterator[] chunkACIs)
computeTextRuns in class org.apache.batik.bridge.StrokingTextPainterprotected java.util.Set getTextRunBoundaryAttributes()
getTextRunBoundaryAttributes in class org.apache.batik.bridge.StrokingTextPainterprotected java.util.List reorderTextRuns(org.apache.batik.bridge.StrokingTextPainter.TextChunk chunk,
java.util.List runs)
reorderTextRuns in class org.apache.batik.bridge.StrokingTextPainterprotected abstract void preparePainting(java.awt.Graphics2D g2d)
protected abstract void saveGraphicsState()
throws java.io.IOException
java.io.IOExceptionprotected abstract void restoreGraphicsState()
throws java.io.IOException
java.io.IOExceptionprotected abstract void setInitialTransform(java.awt.geom.AffineTransform transform)
throws java.io.IOException
java.io.IOExceptionprotected abstract void clip(java.awt.Shape clip)
throws java.io.IOException
java.io.IOExceptionprotected abstract void beginTextObject()
throws java.io.IOException
java.io.IOExceptionprotected abstract void endTextObject()
throws java.io.IOException
java.io.IOExceptionprotected abstract void positionGlyph(java.awt.geom.Point2D prevPos,
java.awt.geom.Point2D glyphPos,
boolean reposition)
protected abstract void writeGlyph(char glyph,
java.awt.geom.AffineTransform transform)
throws java.io.IOException
java.io.IOExceptionprotected final void logTextRun(org.apache.batik.bridge.StrokingTextPainter.TextRun textRun)
protected final void logCharacter(char ch,
org.apache.batik.bridge.TextSpanLayout layout,
int index,
boolean visibleChar)
ch - a characterlayout - a text span layoutindex - an indexvisibleChar - visible character flagprotected org.apache.batik.bridge.FontFamilyResolver getFontFamilyResolver()
getFontFamilyResolver in class org.apache.batik.bridge.StrokingTextPainterprotected org.apache.batik.bridge.TextLayoutFactory getTextLayoutFactory()
getTextLayoutFactory in class org.apache.batik.bridge.BasicTextPainterCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.