Class IFRenderer.TextUtil

java.lang.Object
org.apache.fop.render.intermediate.IFRenderer.TextUtil
Enclosing class:
IFRenderer

private class IFRenderer.TextUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int[][]
     
    private static final int
     
    private boolean
     
    private int
     
    private int
     
    private final StringBuffer
     
    private int
     
    private int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    addChar(char ch)
     
    (package private) void
    adjust(int dx)
     
    (package private) void
    adjust(int[] pa)
     
    (package private) void
    drawText(int x, int y, int letterSpacing, int wordSpacing, int[][] dx, String text, boolean nextIsSpace)
     
    (package private) void
     
    (package private) void
     
    (package private) void
    setSpacing(int tls, int tws)
     
    (package private) void
    setStartPosition(int x, int y)
     
    private int[][]
    trimAdjustments(int[][] dp, int textLength)
    Trim adjustments array dp to be no greater length than text length, and where trailing all-zero entries are removed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INITIAL_BUFFER_SIZE

      private static final int INITIAL_BUFFER_SIZE
      See Also:
    • dp

      private int[][] dp
    • text

      private final StringBuffer text
    • startx

      private int startx
    • starty

      private int starty
    • tls

      private int tls
    • tws

      private int tws
    • nextIsSpace

      private boolean nextIsSpace
  • Constructor Details

    • TextUtil

      private TextUtil()
  • Method Details

    • addChar

      void addChar(char ch)
    • adjust

      void adjust(int dx)
    • adjust

      void adjust(int[] pa)
    • reset

      void reset()
    • setStartPosition

      void setStartPosition(int x, int y)
    • setSpacing

      void setSpacing(int tls, int tws)
    • flush

      void flush()
    • drawText

      void drawText(int x, int y, int letterSpacing, int wordSpacing, int[][] dx, String text, boolean nextIsSpace) throws IFException
      Throws:
      IFException
    • trimAdjustments

      private int[][] trimAdjustments(int[][] dp, int textLength)
      Trim adjustments array dp to be no greater length than text length, and where trailing all-zero entries are removed.
      Parameters:
      dp - a position adjustments array (or null)
      textLength - the length of the associated text
      Returns:
      either the original value of dp or a copy of its first N significant adjustment entries, such that N is no greater than text length, and the last entry has a non-zero adjustment.