Foxit PDF SDK
 All Classes Namespaces Functions Enumerations Enumerator Properties Pages
foxit.pdf.graphics.TextState Class Reference

Inherits SystemIDisposable.

Public Types

enum  Mode {
  Mode.e_ModeFill = 0, Mode.e_ModeStroke = 1, Mode.e_ModeFillStroke = 2, Mode.e_ModeInvisible = 3,
  Mode.e_ModeFillClip = 4, Mode.e_ModeStrokeClip = 5, Mode.e_ModeFillStrokeClip = 6, Mode.e_ModeClip = 7
}
 Enumeration for text mode. More...
 

Public Member Functions

 TextState (int version, Font font, float font_size, float charspace, float wordspace, TextState.Mode textmode, PointF origin_position, float[] textmatrix)
 Constructor, with parameters. More...
 
 TextState ()
 Constructor.
 
 TextState (TextState state)
 Constructor, with another text state object. More...
 
void Set (int version, Font font, float font_size, float charspace, float wordspace, TextState.Mode textmode, PointF origin_position, float[] textmatrix)
 Set value. More...
 

Properties

float charspace [get, set]
 Character spacing. More...
 
Font font [get, set]
 A font object.
 
float font_size [get, set]
 The font size in "Tf". If valid, it should be above 0.
 
PointF origin_position [get, set]
 The origin point, in PDF coordinate system.
 
float[] textmatrix [get, set]
 Text transformation matrix. More...
 
TextState.Mode textmode [get, set]
 Text rendering mode. Please refer to values starting from foxit.pdf.graphics.TextState.Mode.e_ModeFill and this should be one of these values.
 
int version [get, set]
 Version of this class. More...
 
float wordspace [get, set]
 Word spacing (only apply to space character). More...
 

Detailed Description

This class represents PDF text state.

Member Enumeration Documentation

Enumeration for text mode.

Values of this enumeration should be used alone.

Enumerator
e_ModeFill 

Text mode: fill text.

e_ModeStroke 

Text mode: stroke text.

e_ModeFillStroke 

Text mode: fill and stroke text.

e_ModeInvisible 

Text mode: neither fill nor stroke text, to make it invisible.

e_ModeFillClip 

Text mode: fill text and add to path for clipping.

e_ModeStrokeClip 

Text mode: stroke text and add to path for clipping.

e_ModeFillStrokeClip 

Text mode: fill and stroke text, and add to path for clipping.

e_ModeClip 

Text mode: add text to path for clipping.

Constructor & Destructor Documentation

foxit.pdf.graphics.TextState.TextState ( int  version,
Font  font,
float  font_size,
float  charspace,
float  wordspace,
TextState.Mode  textmode,
PointF  origin_position,
float[]  textmatrix 
)
inline

Constructor, with parameters.

Parameters
[in]versionVersion of this structure, which is used to decide which members are useful. Currently, only 1 is valid.
[in]font(Version 1) A valid font object.
[in]font_size(Version 1) The font size in "Tf", It should be above 0.
[in]charspace(Version 1) Character spacing.
[in]wordspace(Version 1) Word spacing (only apply to space character).
[in]textmode(Version 1) Text rendering mode. Please refer to values starting from foxit.pdf.graphics.TextState.Mode.e_ModeFill and this should be one of these values.
[in]origin_position(Version 1) The origin point, in PDF coordinate system.
[in]textmatrix(Version 1) Text transformation matrix. This is an array of four numbers.
Returns
None.
foxit.pdf.graphics.TextState.TextState ( TextState  state)
inline

Constructor, with another text state object.

Parameters
[in]stateAnother text state object.

Member Function Documentation

void foxit.pdf.graphics.TextState.Set ( int  version,
Font  font,
float  font_size,
float  charspace,
float  wordspace,
TextState.Mode  textmode,
PointF  origin_position,
float[]  textmatrix 
)
inline

Set value.

Parameters
[in]versionVersion of this structure, which is used to decide which members are useful. Currently, only 1 is valid.
[in]font(Version 1) A valid font object.
[in]font_size(Version 1) The font size in "Tf". It should be above 0.
[in]charspace(Version 1) Character spacing.
[in]wordspace(Version 1) Word spacing (only apply to space character).
[in]textmode(Version 1) Text rendering mode. Please refer to values starting from foxit.pdf.graphics.TextState.Mode.e_ModeFill and this should be one of these values.
[in]origin_position(Version 1) The origin point, in PDF coordinate system.
[in]textmatrix(Version 1) Text transformation matrix. This is an array of four numbers.
Returns
None.

Property Documentation

float foxit.pdf.graphics.TextState.charspace
getset

Character spacing.

For horizontal writing, a positive value has the effect of expanding the distance between glyphs, whereas for vertical writing, a negative value has this effect.

float [] foxit.pdf.graphics.TextState.textmatrix
getset

Text transformation matrix.

This is an array of four numbers. The first number is the input coefficient a, the second number is the input coefficient b, the third number is the input coefficient c, the forth number is the input coefficient d.

int foxit.pdf.graphics.TextState.version
getset

Version of this class.

Members of this class may be extended in the future. This version can be used to separate the different extended members.

float foxit.pdf.graphics.TextState.wordspace
getset

Word spacing (only apply to space character).

For horizontal writing, a positive value has the effect of increasing the spacing between words. For vertical writing, a positive value decreases the spacing between words (and a negative value increases it), since vertical coordinates increase from bottom to top. This will not take effect if font of current object is an embedded font.