Package org.apache.fop.svg
Class PDFFlowTextPainter
- java.lang.Object
-
- org.apache.batik.bridge.BasicTextPainter
-
- org.apache.batik.bridge.StrokingTextPainter
-
- org.apache.fop.svg.NativeTextPainter
-
- org.apache.fop.svg.PDFFlowTextPainter
-
- All Implemented Interfaces:
org.apache.batik.bridge.TextPainter
public class PDFFlowTextPainter extends NativeTextPainter
Text Painter for SVG 1.2 (flow) text.
-
-
Field Summary
-
Fields inherited from class org.apache.fop.svg.NativeTextPainter
font, fontFamilyResolver, fontInfo, log, tpi
-
Fields inherited from class org.apache.batik.bridge.StrokingTextPainter
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 Summary
Constructors Constructor Description PDFFlowTextPainter(FontInfo fontInfo)
Main constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beginTextObject()
protected void
clip(java.awt.Shape clip)
protected void
endTextObject()
java.util.List
getTextRuns(org.apache.batik.bridge.TextNode node, java.text.AttributedCharacterIterator aci)
protected boolean
isSupported(java.awt.Graphics2D g2d)
Indicates whether the givenGraphics2D
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 transform)
protected void
writeGlyphs(FOPGVTGlyphVector gv, java.awt.geom.GeneralPath debugShapes)
-
Methods inherited from class org.apache.fop.svg.NativeTextPainter
collectCharacters, computeTextRuns, getFontFamilyResolver, getTextLayoutFactory, getTextRunBoundaryAttributes, logCharacter, logTextRun, paintTextRun, paintTextRuns, reorderTextRuns
-
Methods inherited from class org.apache.batik.bridge.StrokingTextPainter
adjustChunkOffsets, computeTextRuns, createModifiedACIForFontMatching, getBounds2D, getDecorationOutline, getDecorationStrokeOutline, getHighlightShape, getInstance, getMark, getOutline, getSelected, getTextChunk, getTextChunkACIs, hitTest, paint, paintDecorations, printAttrs, selectFirst, selectLast
-
-
-
-
Constructor Detail
-
PDFFlowTextPainter
public PDFFlowTextPainter(FontInfo fontInfo)
Main constructor- Parameters:
fontInfo
- the font directory
-
-
Method Detail
-
getTextRuns
public java.util.List getTextRuns(org.apache.batik.bridge.TextNode node, java.text.AttributedCharacterIterator aci)
- Overrides:
getTextRuns
in classorg.apache.batik.bridge.StrokingTextPainter
-
isSupported
protected boolean isSupported(java.awt.Graphics2D g2d)
Indicates whether the givenGraphics2D
instance if compatible with this text painter implementation.- Specified by:
isSupported
in classNativeTextPainter
- Parameters:
g2d
- the instance to check- Returns:
- true if the instance is compatible.
-
preparePainting
protected void preparePainting(java.awt.Graphics2D g2d)
- Specified by:
preparePainting
in classNativeTextPainter
-
saveGraphicsState
protected void saveGraphicsState()
- Specified by:
saveGraphicsState
in classNativeTextPainter
-
restoreGraphicsState
protected void restoreGraphicsState()
- Specified by:
restoreGraphicsState
in classNativeTextPainter
-
setInitialTransform
protected void setInitialTransform(java.awt.geom.AffineTransform transform)
- Specified by:
setInitialTransform
in classNativeTextPainter
-
clip
protected void clip(java.awt.Shape clip)
- Specified by:
clip
in classNativeTextPainter
-
writeGlyphs
protected void writeGlyphs(FOPGVTGlyphVector gv, java.awt.geom.GeneralPath debugShapes) throws java.io.IOException
- Overrides:
writeGlyphs
in classNativeTextPainter
- Throws:
java.io.IOException
-
beginTextObject
protected void beginTextObject()
- Specified by:
beginTextObject
in classNativeTextPainter
-
endTextObject
protected void endTextObject()
- Specified by:
endTextObject
in classNativeTextPainter
-
positionGlyph
protected void positionGlyph(java.awt.geom.Point2D prevPos, java.awt.geom.Point2D glyphPos, boolean reposition)
- Specified by:
positionGlyph
in classNativeTextPainter
-
writeGlyph
protected void writeGlyph(char glyph, java.awt.geom.AffineTransform transform)
- Specified by:
writeGlyph
in classNativeTextPainter
-
-