TextState

TextState class

Represents a text state of a text

The TextState type exposes the following members:

Constructors

NameDescription
TextState()Creates text state object.
TextState(font_size)Initializes a new instance of the TextState class
TextState(foreground_color)Initializes a new instance of the TextState class
TextState(foreground_color, font_size)Initializes a new instance of the TextState class
TextState(font_family)Initializes a new instance of the TextState class
TextState(font_family, bold, italic)Initializes a new instance of the TextState class
TextState(font_family, font_size)Initializes a new instance of the TextState class

Properties

NameDescription
character_spacingGets or sets character spacing of the text.
line_spacingGets or sets line spacing of the text.
horizontal_scalingGets or sets horizontal scaling of the text.
subscriptGets or sets subscript of the text.
superscriptGets or sets superscript of the text.
word_spacingGets or sets word spacing of the text.
invisibleGets or sets the invisibility of text. This basically reflects the rendering_mode state, except for some special cases (like clipping).
rendering_modeGets or sets rendering mode of text.
font_sizeGets or sets font size of the text.
fontGets or sets font of the text.
foreground_colorGets or sets foreground color of the text.
stroking_colorGets or sets foreground color of the text.
underlineGets or sets underline for the text, represented by the TextFragment object
strike_outSets strikeout for the text, represented by the TextFragment object
background_colorSets background color of the text.
font_styleSets font style of the text.
horizontal_alignmentGets or sets horizontal alignment for the text.
TAB_TAGYou can place this tag in text to declare tabulation.
TABSTOP_DEFAULT_VALUEDefault value of tabulation in widths of space character of default font.

Methods

NameDescription
apply_changes_from(text_state)Applies settings from another textState.
measure_string(str)Measures the string.

See Also