Foxit PDF SDK
9.1
|
Public Member Functions | |
TextState (int version, Font font, float font_size, float charspace, float wordspace, int 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, int textmode, PointF origin_position, float[] textmatrix) |
Set value. More... | |
void | setVersion (int value) |
Set version of this class. More... | |
int | getVersion () |
Get version of this class. More... | |
void | setFont (Font value) |
Set a font object. More... | |
Font | getFont () |
Get a font object. More... | |
void | setFont_size (float value) |
Set the font size in "Tf". More... | |
float | getFont_size () |
Get the font size in "Tf". More... | |
void | setCharspace (float value) |
Set character spacing. More... | |
float | getCharspace () |
Get character spacing. More... | |
void | setWordspace (float value) |
Set word spacing (only apply to space character). More... | |
float | getWordspace () |
Get word spacing (only apply to space character). More... | |
void | setTextmode (int value) |
Set text rendering mode. More... | |
int | getTextmode () |
Get text rendering mode. More... | |
void | setOrigin_position (PointF value) |
Set the origin point, in PDF coordinate system. More... | |
PointF | getOrigin_position () |
Get the origin point, in PDF coordinate system. More... | |
void | setTextmatrix (float[] value) |
Set text transformation matrix. More... | |
float[] | getTextmatrix () |
Get text transformation matrix. More... | |
Static Public Attributes | |
static final int | e_ModeFill = 0 |
Text mode: fill text. | |
static final int | e_ModeStroke = 1 |
Text mode: stroke text. | |
static final int | e_ModeFillStroke = 2 |
Text mode: fill and stroke text. | |
static final int | e_ModeInvisible = 3 |
Text mode: neither fill nor stroke text, to make it invisible. | |
static final int | e_ModeFillClip = 4 |
Text mode: fill text and add to path for clipping. | |
static final int | e_ModeStrokeClip = 5 |
Text mode: stroke text and add to path for clipping. | |
static final int | e_ModeFillStrokeClip = 6 |
Text mode: fill and stroke text, and add to path for clipping. | |
static final int | e_ModeClip = 7 |
Text mode: add text to path for clipping. | |
This class represents PDF text state.
com.foxit.sdk.pdf.graphics.TextState.TextState | ( | int | version, |
Font | font, | ||
float | font_size, | ||
float | charspace, | ||
float | wordspace, | ||
int | textmode, | ||
PointF | origin_position, | ||
float[] | textmatrix | ||
) |
Constructor, with parameters.
[in] | version | Version 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 com.foxit.sdk.pdf.graphics.TextState.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. |
com.foxit.sdk.pdf.graphics.TextState.TextState | ( | TextState | state | ) |
Constructor, with another text state object.
[in] | state | Another text state object. |
com.foxit.sdk.pdf.graphics.TextState.getCharspace | ( | ) |
Get 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.
com.foxit.sdk.pdf.graphics.TextState.getFont | ( | ) |
Get a font object.
com.foxit.sdk.pdf.graphics.TextState.getFont_size | ( | ) |
Get the font size in "Tf".
com.foxit.sdk.pdf.graphics.TextState.getOrigin_position | ( | ) |
com.foxit.sdk.pdf.graphics.TextState.getTextmatrix | ( | ) |
Get 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.
com.foxit.sdk.pdf.graphics.TextState.getTextmode | ( | ) |
Get text rendering mode.
com.foxit.sdk.pdf.graphics.TextState.getVersion | ( | ) |
Get 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.
com.foxit.sdk.pdf.graphics.TextState.getWordspace | ( | ) |
Get 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.
void com.foxit.sdk.pdf.graphics.TextState.set | ( | int | version, |
Font | font, | ||
float | font_size, | ||
float | charspace, | ||
float | wordspace, | ||
int | textmode, | ||
PointF | origin_position, | ||
float[] | textmatrix | ||
) |
Set value.
[in] | version | Version 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 com.foxit.sdk.pdf.graphics.TextState.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. |
com.foxit.sdk.pdf.graphics.TextState.setCharspace | ( | float | value | ) |
Set 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.
[in] | value | Character spacing. |
com.foxit.sdk.pdf.graphics.TextState.setFont | ( | Font | value | ) |
Set a font object.
[in] | value | A font object. |
com.foxit.sdk.pdf.graphics.TextState.setFont_size | ( | float | value | ) |
Set the font size in "Tf".
[in] | value | The font size in "Tf". If valid, it should be above 0. |
com.foxit.sdk.pdf.graphics.TextState.setOrigin_position | ( | PointF | value | ) |
Set the origin point, in PDF coordinate system.
[in] | value | The origin point, in PDF coordinate system. |
com.foxit.sdk.pdf.graphics.TextState.setTextmatrix | ( | float[] | value | ) |
Set 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.
[in] | value | Text transformation matrix. |
com.foxit.sdk.pdf.graphics.TextState.setTextmode | ( | int | value | ) |
Set text rendering mode.
[in] | value | Text rendering mode. Please refer to values starting from com.foxit.sdk.pdf.graphics.TextState.e_ModeFill and this should be one of these values. |
com.foxit.sdk.pdf.graphics.TextState.setVersion | ( | int | value | ) |
Set 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.
[in] | value | Version of this class. |
com.foxit.sdk.pdf.graphics.TextState.setWordspace | ( | float | value | ) |
Set 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.
[in] | value | Word spacing (only apply to space character). |