TextState Class Documentation

classTextState

Namespace:datalogics_interface

Detailed Description

These parameters include character and word spacing, font, font size, and horizontal scale.

Referenced by

Uses types

Constructor & Destructor Documentation

TextState

TextState()

Create a default text state.

~TextState

~TextState()

Member Function Documentation

get_character_spacing

doubleget_character_spacing()

Returns:

double

The current character spacing (corresponding to the Tc operator), in unscaled text space units.

get_font_size

doubleget_font_size()

Returns:

double

The current font size (corresponding to the Tf operator).

get_horizontal_scale

doubleget_horizontal_scale()

Returns:

double

The current horizontal scaling (corresponding to the Tz operator), as a percentage of the normal glyph width. Default is 100.

get_text_rise

doubleget_text_rise()

Returns:

double

The current text rise (corresponding to the Ts operator), in unscaled text space units.

get_word_spacing

doubleget_word_spacing()

Returns:

double

The current word spacing (corresponding to the Tw operator), in unscaled text space units.

set_character_spacing

voidset_character_spacing(doublespacing)

Parameters

spacing: double

- the new/updated character spacing

Returns:

void

The current character spacing (corresponding to the Tc operator), in unscaled text space units.

set_font_size

voidset_font_size(doublesize)

Parameters

size: double

- the new/updated font size

Returns:

void

The current font size (corresponding to the Tf operator).

set_horizontal_scale

voidset_horizontal_scale(doublescale)

Parameters

scale: double

- the new/updated horizontal scaling

Returns:

void

The current horizontal scaling (corresponding to the Tz operator), as a percentage of the normal glyph width. Default is 100.

set_render_mode

voidset_render_mode(TextRenderModemode)

Parameters

mode: TextRenderMode

- the new/updated text rendering mode

Returns:

void

The current text rendering mode (corresponding to the Tr operator).

set_text_rise

voidset_text_rise(doublerise)

Parameters

rise: double

- the new/updated text rise

Returns:

void

The current text rise (corresponding to the Ts operator), in unscaled text space units.

set_word_spacing

voidset_word_spacing(doublespacing)

Parameters

spacing: double

- the new/updated character spacing

Returns:

void

The current word spacing (corresponding to the Tw operator), in unscaled text space units.