org.icepdf.core.pobjects.graphics
Class TextState

java.lang.Object
  extended by org.icepdf.core.pobjects.graphics.TextState

public class TextState
extends java.lang.Object

The text state comprises those graphics state parameters that only affect text.

Tc - Character spacing Tw - Word spacing Th - Horizontal scaling Tl - Leading Tf Text font Tfs - Text font size Tmode - Text rendering mode Trise - Text rise Tk - Text knockout

Since:
2.0

Field Summary
 float cspace
          Set the character spacing, Tc, to charSpace, which is a number expressed in unscaled text space units.
 FontFile currentfont
          Text Font - Associated awt font object for display purposes
 Font font
          Text Font - Associated ICEpdf font object
 float hScalling
          Set the horizontal scaling, Th, to (scale div 100).
 float leading
          Set the text leading, Tl, to leading, which is a number expressed in unscaled text space units.
static int MODE_ADD
          Add text to path for clipping
static int MODE_FILL
          Fill text
static int MODE_FILL_ADD
          Fill text and add to path for clipping.
static int MODE_FILL_STROKE
          Fill then stroke text.
static int MODE_FILL_STROKE_ADD
          Fill then stroke,text and add to path for clipping
static int MODE_INVISIBLE
          Neither fill nor stroke text
static int MODE_STROKE
          Stroke text
static int MODE_STROKE_ADD
          Stroke text and add to path for clipping
 int rmode
          Set the text rendering mode, Tmode, to render, which is an integer.
 java.awt.geom.AffineTransform tlmatrix
           
 java.awt.geom.AffineTransform tmatrix
          Transformation matrix defined by the Tm tag
 float trise
          Set the text rise, Trise, to rise, which is a number expressed in unscaled text space units.
 float tsize
          Text Font size
protected  PRectangle type3BBox
           
protected  java.awt.geom.Point2D.Float type3HorizontalDisplacement
           
 float wspace
          Set the word spacing, Tw, to wordSpace, which is a number expressed in unscaled text space units.
 
Constructor Summary
TextState()
          Create a new Instance of TextState
TextState(TextState ts)
          Creat a new instance of TextState.
 
Method Summary
 PRectangle getType3BBox()
           
 java.awt.geom.Point2D.Float getType3HorizontalDisplacement()
           
 void setType3BBox(PRectangle type3BBox)
           
 void setType3HorizontalDisplacement(java.awt.geom.Point2D.Float type3HorizontalDisplacement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_FILL

public static final int MODE_FILL
Fill text

See Also:
Constant Field Values

MODE_STROKE

public static final int MODE_STROKE
Stroke text

See Also:
Constant Field Values

MODE_FILL_STROKE

public static final int MODE_FILL_STROKE
Fill then stroke text.

See Also:
Constant Field Values

MODE_INVISIBLE

public static final int MODE_INVISIBLE
Neither fill nor stroke text

See Also:
Constant Field Values

MODE_FILL_ADD

public static final int MODE_FILL_ADD
Fill text and add to path for clipping.

See Also:
Constant Field Values

MODE_STROKE_ADD

public static final int MODE_STROKE_ADD
Stroke text and add to path for clipping

See Also:
Constant Field Values

MODE_FILL_STROKE_ADD

public static final int MODE_FILL_STROKE_ADD
Fill then stroke,text and add to path for clipping

See Also:
Constant Field Values

MODE_ADD

public static final int MODE_ADD
Add text to path for clipping

See Also:
Constant Field Values

type3BBox

protected PRectangle type3BBox

type3HorizontalDisplacement

protected java.awt.geom.Point2D.Float type3HorizontalDisplacement

cspace

public float cspace
Set the character spacing, Tc, to charSpace, which is a number expressed in unscaled text space units. Character spacing is used by the Tj, TJ, and ' operators. Initial value: 0.


wspace

public float wspace
Set the word spacing, Tw, to wordSpace, which is a number expressed in unscaled text space units. Word spacing is used by the Tj, TJ, and ' operators. Initial value: 0.


hScalling

public float hScalling
Set the horizontal scaling, Th, to (scale div 100). scale is a number specifying the percentage of the normal width. Initial value: 100 (normal width).


leading

public float leading
Set the text leading, Tl, to leading, which is a number expressed in unscaled text space units. Text leading is used only by the T*, ', and " operators. Initial value: 0.


tsize

public float tsize
Text Font size


rmode

public int rmode
Set the text rendering mode, Tmode, to render, which is an integer. Initial value: 0.


trise

public float trise
Set the text rise, Trise, to rise, which is a number expressed in unscaled text space units. Initial value: 0.


tmatrix

public java.awt.geom.AffineTransform tmatrix
Transformation matrix defined by the Tm tag


tlmatrix

public java.awt.geom.AffineTransform tlmatrix

font

public Font font
Text Font - Associated ICEpdf font object


currentfont

public FontFile currentfont
Text Font - Associated awt font object for display purposes

Constructor Detail

TextState

public TextState()
Create a new Instance of TextState


TextState

public TextState(TextState ts)
Creat a new instance of TextState. All text state properites are copied from ts.

Parameters:
ts - text state to
Method Detail

getType3BBox

public PRectangle getType3BBox()

setType3BBox

public void setType3BBox(PRectangle type3BBox)

getType3HorizontalDisplacement

public java.awt.geom.Point2D.Float getType3HorizontalDisplacement()

setType3HorizontalDisplacement

public void setType3HorizontalDisplacement(java.awt.geom.Point2D.Float type3HorizontalDisplacement)