TextRun Class Documentation
class TextRunNamespace:datalogics_interface
Detailed Description
Represents one or more contiguous characters in a text object.
@structure PDEGraphicState @structure PDETextState @structure PDETextItem
All the characters contained within a text run have the same style, color, font, and size.
Referenced by
Uses types
Constructor & Destructor Documentation
TextRun
TextRun(const std::string & text, Font & font, GraphicState & gstate, TextState & tstate, const Matrix & matrix)Parameters
text: const std::string &The text content for this run.
font: Font &The font to use for rendering the text.
gstate: GraphicState &The graphic state (colors, line width, etc.) for this text run.
tstate: TextState &The text state (character spacing, word spacing, font size, etc.) for this text run.
matrix: const Matrix &The transformation matrix positioning this text run in user space.
Creates a new TextRun with the specified text, font, graphic state, text state, and matrix.
TextRun
TextRun(TextRun && )Parameters
~TextRun
~TextRun()Member Function Documentation
clear_graphic_state
void clear_graphic_state()Returns:
voidRemoves the graphic state from this text run.
get_advance
double get_advance()Returns:
doubleThe advance width of this text run.
Deprecated, use Text.GetAdvanceForTextRun(int textRunIndex) instead. This version does not indicate the direction of the advance width.
The advance width of this run of text, in user space.
The advance width is the amount by which the current point advances when the text run is drawn.
get_bounding_box
Rect get_bounding_box()Returns:
RectRepresents one or more contiguous characters in a text object.
@structure PDEGraphicState @structure PDETextState @structure PDETextItem
All the characters contained within a text run have the same style, color, font, and size.
get_font
Font get_font()Returns:
FontThe font for this text run.
The font used to render this TextRun.
get_graphic_state
std::unique_ptr< GraphicState > get_graphic_state()Returns:
std::unique_ptr< GraphicState >The GraphicState for this text run, or null.
The graphic state (colors, line width, etc.) of the text run.
May return null if this element does not have a GraphicState.
get_matrix
Matrix get_matrix()Returns:
MatrixRepresents one or more contiguous characters in a text object.
@structure PDEGraphicState @structure PDETextState @structure PDETextItem
All the characters contained within a text run have the same style, color, font, and size.
get_text
std::string get_text()Returns:
std::stringThe text string for this run.
The Unicode text content of this TextRun.
get_text_state
TextState get_text_state()Returns:
TextStateThe TextState for this text run.
The text state parameters (character spacing, word spacing, font size, etc.) of this TextRun.
operator=
TextRun & operator=(TextRun && )Parameters
Returns:
TextRun &set_font
void set_font(Font & font)Parameters
font: Font &The new font for this text run.
Returns:
voidThe font used to render this TextRun.
set_graphic_state
void set_graphic_state(const GraphicState & gstate)Parameters
gstate: const GraphicState &- the new/updated Graphic State for the text run.
Returns:
voidSet the Graphic State of the text run.
set_matrix
void set_matrix(const Matrix & matrix)Parameters
matrix: const Matrix &
Returns:
voidRepresents one or more contiguous characters in a text object.
@structure PDEGraphicState @structure PDETextState @structure PDETextItem
All the characters contained within a text run have the same style, color, font, and size.
set_text
void set_text(const std::string & text)Parameters
text: const std::string &The new text content for this run.
Returns:
voidThe Unicode text content of this TextRun.