Foxit PDF SDK
FSTextState Class Reference

Inherits NSObject.

Instance Methods

(id) - init
 Constructor.

 
(id) - initWithState:
 Constructor, with another text state object.
More...
 
(id) - initWithVersion:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:
 Constructor, with parameters.
More...
 
(void) - set:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:
 Set value.
More...
 

Properties

float charspace
 Character spacing.
More...
 
FSFontfont
 A font object.
More...
 
float font_size
 Font size. If valid, it should be above 0.
More...
 
FSPointForigin_position
 The origin point, in .
More...
 
NSArray< NSNumber * > * textmatrix
 Text transformation matrix.
More...
 
FSTextStateMode textmode
 Text rendering mode. Please refer to values starting from FSTextStateModeFill and this should be one of these values.
More...
 
unsigned int version
 Version of this class.
More...
 
float wordspace
 Word spacing (only apply to space character).
More...
 

Detailed Description

This class represents PDF text state.

Method Documentation

◆ initWithState:()

- (id) initWithState: (FSTextState*)  state

Constructor, with another text state object.

Parameters
[in]stateAnother text state object.

◆ initWithVersion:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:()

- (id) initWithVersion: (unsigned int)  version
font: (FSFont*)  font
font_size: (float)  font_size
charspace: (float)  charspace
wordspace: (float)  wordspace
textmode: (FSTextStateMode textmode
origin_position: (FSPointF*)  origin_position
textmatrix: (NSArray<NSNumber *> *)  textmatrix 

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) Font size. 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 FSTextStateModeFill and this should be one of these values.
[in]origin_position(Version 1) The origin point, in .
[in]textmatrix(Version 1) Text transformation matrix.
Returns
None.

◆ set:font:font_size:charspace:wordspace:textmode:origin_position:textmatrix:()

- (void) set: (unsigned int)  version
font: (FSFont*)  font
font_size: (float)  font_size
charspace: (float)  charspace
wordspace: (float)  wordspace
textmode: (FSTextStateMode textmode
origin_position: (FSPointF*)  origin_position
textmatrix: (NSArray<NSNumber *> *)  textmatrix 

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) Font size. 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 FSTextStateModeFill and this should be one of these values.
[in]origin_position(Version 1) The origin point, in .
[in]textmatrix(Version 1) Text transformation matrix.
Returns
None.

Property Documentation

◆ charspace

- (float) charspace
readwritenonatomicassign

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.

◆ font

- (FSFont *) font
readwritenonatomicweak

A font object.


◆ font_size

- (float) font_size
readwritenonatomicassign

Font size. If valid, it should be above 0.


◆ origin_position

- (FSPointF *) origin_position
readwritenonatomicweak

The origin point, in .


◆ textmatrix

- (NSArray< NSNumber * > *) textmatrix
readwritenonatomicweak

Text transformation matrix.


◆ textmode

- (FSTextStateMode) textmode
readwritenonatomicassign

Text rendering mode. Please refer to values starting from FSTextStateModeFill and this should be one of these values.


◆ version

- (unsigned int) version
readwritenonatomicassign

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.

◆ wordspace

- (float) wordspace
readwritenonatomicassign

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.