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