public abstract class NativeTextPainter
extends org.apache.batik.gvt.renderer.StrokingTextPainter
Modifier and Type | Field and Description |
---|---|
protected FontInfo |
fontInfo
the font collection
|
protected org.apache.commons.logging.Log |
log
the logger for this class
|
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 java.lang.CharSequence |
collectCharacters(java.text.AttributedCharacterIterator runaci)
Collects all characters from an
AttributedCharacterIterator . |
protected Font[] |
findFonts(java.text.AttributedCharacterIterator aci)
Finds an array of suitable fonts for a given AttributedCharacterIterator.
|
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.gvt.text.TextSpanLayout layout,
int index,
boolean visibleChar) |
protected void |
logTextRun(java.text.AttributedCharacterIterator runaci,
org.apache.batik.gvt.text.TextSpanLayout layout) |
protected abstract void |
paintTextRun(org.apache.batik.gvt.renderer.StrokingTextPainter.TextRun textRun,
java.awt.Graphics2D g2d)
Paints a single text run.
|
protected void |
paintTextRuns(java.util.List textRuns,
java.awt.Graphics2D g2d) |
adjustChunkOffsets, computeTextRuns, createModifiedACIForFontMatching, getBounds2D, getDecorationOutline, getDecorationStrokeOutline, getHighlightShape, getInstance, getMark, getOutline, getSelected, getTextChunk, getTextChunkACIs, getTextRuns, hitTest, paint, paintDecorations, printAttrs, selectFirst, selectLast
protected org.apache.commons.logging.Log log
protected final FontInfo fontInfo
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 abstract void paintTextRun(org.apache.batik.gvt.renderer.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 paintTextRuns(java.util.List textRuns, java.awt.Graphics2D g2d)
paintTextRuns
in class org.apache.batik.gvt.renderer.StrokingTextPainter
protected Font[] findFonts(java.text.AttributedCharacterIterator aci)
aci
- the character iteratorprotected java.lang.CharSequence collectCharacters(java.text.AttributedCharacterIterator runaci)
AttributedCharacterIterator
.runaci
- the character iteratorprotected final void logTextRun(java.text.AttributedCharacterIterator runaci, org.apache.batik.gvt.text.TextSpanLayout layout)
protected final void logCharacter(char ch, org.apache.batik.gvt.text.TextSpanLayout layout, int index, boolean visibleChar)
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.