org.apache.fop.svg

## Class PDFFlowExtTextPainter

- java.lang.Object
- - org.apache.batik.bridge.BasicTextPainter
  - - org.apache.batik.bridge.StrokingTextPainter
    - - org.apache.fop.svg.NativeTextPainter
      - - org.apache.fop.svg.PDFFlowExtTextPainter

- All Implemented Interfaces:
    org.apache.batik.bridge.TextPainter

      public class PDFFlowExtTextPainter
      extends NativeTextPainter

  Text Painter for Batik's flow text extension.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.batik.bridge.StrokingTextPainter

      `org.apache.batik.bridge.StrokingTextPainter.TextChunk, org.apache.batik.bridge.StrokingTextPainter.TextRun`

    - ### Nested classes/interfaces inherited from class org.apache.batik.bridge.BasicTextPainter

      `org.apache.batik.bridge.BasicTextPainter.BasicMark`

  - ### 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`

    - ### Fields inherited from class org.apache.batik.bridge.BasicTextPainter

      `aaOffFontRenderContext, fontRenderContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFFlowExtTextPainter(FontInfo fontInfo)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `beginTextObject()`
    `protected void` | `clip(Shape clip)`
    `protected void` | `endTextObject()`
    `List` | `getTextRuns(org.apache.batik.bridge.TextNode node, AttributedCharacterIterator aci)`
    `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 transform)`
    `protected void` | `writeGlyphs(FOPGVTGlyphVector gv, GeneralPath debugShapes)`

    - ### Methods inherited from class org.apache.fop.svg.NativeTextPainter

      `collectCharacters, computeTextRuns, getFontFamilyResolver, getLocalTransform, 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`

    - ### Methods inherited from class org.apache.batik.bridge.BasicTextPainter

      `getGeometryBounds, selectAt, selectTo`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PDFFlowExtTextPainter

          public PDFFlowExtTextPainter(FontInfo fontInfo)

      Main constructor
      Parameters:
        `fontInfo` - the font directory

  - ### Method Detail

    - #### getTextRuns

          public List getTextRuns(org.apache.batik.bridge.TextNode node,
                                  AttributedCharacterIterator aci)

      Overrides:
        `getTextRuns` in class `org.apache.batik.bridge.StrokingTextPainter`

    - #### isSupported

          protected boolean isSupported(Graphics2D g2d)

      Indicates whether the given `Graphics2D` instance if compatible with this text painter implementation.
      Specified by:
        `isSupported` in class `NativeTextPainter`
      Parameters:
        `g2d` - the instance to check
      Returns:
        true if the instance is compatible.

    - #### preparePainting

          protected void preparePainting(Graphics2D g2d)

      Specified by:
        `preparePainting` in class `NativeTextPainter`

    - #### saveGraphicsState

          protected void saveGraphicsState()

      Specified by:
        `saveGraphicsState` in class `NativeTextPainter`

    - #### restoreGraphicsState

          protected void restoreGraphicsState()

      Specified by:
        `restoreGraphicsState` in class `NativeTextPainter`

    - #### setInitialTransform

          protected void setInitialTransform(AffineTransform transform)

      Specified by:
        `setInitialTransform` in class `NativeTextPainter`

    - #### clip

          protected void clip(Shape clip)

      Specified by:
        `clip` in class `NativeTextPainter`

    - #### writeGlyphs

          protected void writeGlyphs(FOPGVTGlyphVector gv,
                                     GeneralPath debugShapes)
                              throws IOException

      Overrides:
        `writeGlyphs` in class `NativeTextPainter`
      Throws:
        `IOException`

    - #### beginTextObject

          protected void beginTextObject()

      Specified by:
        `beginTextObject` in class `NativeTextPainter`

    - #### endTextObject

          protected void endTextObject()

      Specified by:
        `endTextObject` in class `NativeTextPainter`

    - #### positionGlyph

          protected void positionGlyph(Point2D prevPos,
                                       Point2D glyphPos,
                                       boolean reposition)

      Specified by:
        `positionGlyph` in class `NativeTextPainter`

    - #### writeGlyph

          protected void writeGlyph(char glyph,
                                    AffineTransform transform)

      Specified by:
        `writeGlyph` in class `NativeTextPainter`

Copyright © 2025 Apache Software Foundation. All rights reserved.