jPod PDF library

de.intarsys.pdf.content
Class TextState

java.lang.Object
  extended by de.intarsys.pdf.content.TextState

public class TextState
extends Object

This class summarizes all state information that is used to render characters in the current context, such as font, font size or the text transformation matrix etc.


Field Summary
 boolean active
          Flag if text object (text begin operator) is active.
 float charSpacing
          character spacing, unscaled text units initial value: 0
 float derivedCharSpacingScaled
          This is the scaled character spacing.
 float derivedGlyphAdvanceFactor
          The factor to be used to calculate the advance after a glyph.
 float derivedHorizontalScalingFactor
           
 float derivedWordSpacingScaled
          This is the scaled word spacing.
 PDFont font
          the PDFont to use for this text piece initial value: undefined
 float fontSize
          the font scaling initial value: undefined
 AffineTransform globalTransform
          The concatenation of the user space transformation and the text matrix.
 float horizontalScaling
          percentage of normal width initial value: 100
 boolean knockout
           
 float leading
          text leading, unscaled text units initial value: 0
 AffineTransform lineTransform
          The text line matrix.
static int RENDERING_MODE_CLIP
           
static int RENDERING_MODE_FILL
           
static int RENDERING_MODE_FILL_CLIP
           
static int RENDERING_MODE_FILL_STROKE
           
static int RENDERING_MODE_FILL_STROKE_CLIP
           
static int RENDERING_MODE_NONE
           
static int RENDERING_MODE_STROKE
           
static int RENDERING_MODE_STROKE_CLIP
           
 int renderingMode
          rendering mode, enumeration initial value: 0
 float rise
          text rise, unscaled text units initial value: 0
 AffineTransform transform
          The text matrix.
 float wordSpacing
          word spacing, unscaled text units initial value: 0
 
Constructor Summary
TextState()
           
 
Method Summary
 TextState copy()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDERING_MODE_CLIP

public static final int RENDERING_MODE_CLIP
See Also:
Constant Field Values

RENDERING_MODE_FILL

public static final int RENDERING_MODE_FILL
See Also:
Constant Field Values

RENDERING_MODE_FILL_CLIP

public static final int RENDERING_MODE_FILL_CLIP
See Also:
Constant Field Values

RENDERING_MODE_FILL_STROKE

public static final int RENDERING_MODE_FILL_STROKE
See Also:
Constant Field Values

RENDERING_MODE_FILL_STROKE_CLIP

public static final int RENDERING_MODE_FILL_STROKE_CLIP
See Also:
Constant Field Values

RENDERING_MODE_NONE

public static final int RENDERING_MODE_NONE
See Also:
Constant Field Values

RENDERING_MODE_STROKE

public static final int RENDERING_MODE_STROKE
See Also:
Constant Field Values

RENDERING_MODE_STROKE_CLIP

public static final int RENDERING_MODE_STROKE_CLIP
See Also:
Constant Field Values

active

public boolean active
Flag if text object (text begin operator) is active.


charSpacing

public float charSpacing
character spacing, unscaled text units

initial value: 0


derivedCharSpacingScaled

public float derivedCharSpacingScaled
This is the scaled character spacing.

This is a derived value: charSpacingScaled = charSpacing*horizontalScaling


derivedGlyphAdvanceFactor

public float derivedGlyphAdvanceFactor
The factor to be used to calculate the advance after a glyph.

This is a derived value: glyphAdvanceFactor = fontSize/1000*horizontalScalingFactor


derivedHorizontalScalingFactor

public float derivedHorizontalScalingFactor

derivedWordSpacingScaled

public float derivedWordSpacingScaled
This is the scaled word spacing.

This is a derived value: wordSpacingScaled = wordSpacing*horizontalScaling


font

public PDFont font
the PDFont to use for this text piece

initial value: undefined


fontSize

public float fontSize
the font scaling

initial value: undefined


horizontalScaling

public float horizontalScaling
percentage of normal width

initial value: 100


knockout

public boolean knockout

leading

public float leading
text leading, unscaled text units

initial value: 0


lineTransform

public AffineTransform lineTransform
The text line matrix.

This is a temporary attribute that keeps track of the state of tm at the start of a new line.


renderingMode

public int renderingMode
rendering mode, enumeration

initial value: 0


rise

public float rise
text rise, unscaled text units

initial value: 0


transform

public AffineTransform transform
The text matrix.


globalTransform

public AffineTransform globalTransform
The concatenation of the user space transformation and the text matrix.


wordSpacing

public float wordSpacing
word spacing, unscaled text units

initial value: 0

Constructor Detail

TextState

public TextState()
Method Detail

copy

public TextState copy()

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.