TextState Class Documentation

class TextState

Namespace:datalogics_interface

Detailed Description

The text state includes parameters that affect text.

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

double get_character_spacing()

Returns:

double

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

get_font_size

double get_font_size()

Returns:

double

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

get_horizontal_scale

double get_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

double get_text_rise()

Returns:

double

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

get_word_spacing

double get_word_spacing()

Returns:

double

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

set_character_spacing

void set_character_spacing(double spacing)

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

void set_font_size(double size)

Parameters

size: double

- the new/updated font size

Returns:

void

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

set_horizontal_scale

void set_horizontal_scale(double scale)

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

void set_render_mode(TextRenderMode mode)

Parameters

mode: TextRenderMode

- the new/updated text rendering mode

Returns:

void

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

set_text_rise

void set_text_rise(double rise)

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

void set_word_spacing(double spacing)

Parameters

spacing: double

- the new/updated character spacing

Returns:

void

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