Aspose::Pdf::Text::TextFragmentState class

TextFragmentState class

Represents a text state of a text fragment.

class TextFragmentState : public Aspose::Pdf::Text::TextState

Methods

MethodDescription
ApplyChangesFrom(System::SharedPtr<TextState>) overrideApplies settings from another textState.
get_BackgroundColor() overrideSets background color of the text, represented by the TextFragment object.
get_CharacterSpacing() overrideGets character spacing of the text, represented by the TextFragment object.
get_CoordinateOrigin() overrideGets text CoordinateOrigin. If CoordinateOrigin is Descender, the text Y coordinate corresponds to the font’s lowest point. If CoordinateOrigin is BaseLine, the text Y coordinate corresponds to the font’s baseline. The default value is Descender. If the font’s Descent value is too big, text can be rendered higher than other fonts. In this case, CoordinateOrigin BaseLine can be selected for better text rendering.
get_DrawTextRectangleBorder() constGets if text rectangle border drawn flag.
get_Font() overrideGets font of the text, represented by the TextFragment object.
get_FontSize() overrideGets font size of the text, represented by the TextFragment object.
get_FontStyle() overrideSets font style of the text, represented by the TextFragment object.
get_ForegroundColor() overrideGets foreground color of the text, represented by the TextFragment object.
get_FormattingOptions() constGets formatting options. Setting of the options will be effective in generator scenarios only.
get_HorizontalAlignment() overrideGets horizontal alignment for the text.
get_HorizontalScaling() overrideGets horizontal scaling of the text, represented by the TextFragment object.
get_Invisible() overrideGets invisibility of the text.
get_LineSpacing() overrideGets line spacing of the text.
get_RenderingMode() overrideGets rendering mode of the text.
get_Rotation()Gets rotation angle in degrees.
get_StrikeOut() overrideGets strikeout for the text, represented by the TextFragment object.
get_StrokingColor() overrideGets color stroking operations of TextFragment rendering (stroke text, rectangle border)
get_Subscript() overrideGets subscript of the text, represented by the TextFragment object.
get_Superscript() overrideGets superscript of the text, represented by the TextFragment object.
get_TabStops() constGets tabstops for the text.
get_Underline() overrideGets underline for the text, represented by the TextFragment object.
get_WordSpacing() overrideGets word spacing of the text.
IsFitRectangle(System::String, System::SharedPtr<Rectangle>)Checks if input string could be placed inside defined rectangle.
MeasureHeight(char16_t)Measures character height.
MeasureString(System::String) overrideMeasures the string.
set_BackgroundColor(System::SharedPtr<Color>) overrideSets background color of the text, represented by the TextFragment object.
set_CharacterSpacing(float) overrideSets character spacing of the text, represented by the TextFragment object.
set_CoordinateOrigin(Aspose::Pdf::Text::CoordinateOrigin) overrideSets text CoordinateOrigin. If CoordinateOrigin is Descender, the text Y coordinate corresponds to the font’s lowest point. If CoordinateOrigin is BaseLine, the text Y coordinate corresponds to the font’s baseline. The default value is Descender. If the font’s Descent value is too big, text can be rendered higher than other fonts. In this case, CoordinateOrigin BaseLine can be selected for better text rendering.
set_DrawTextRectangleBorder(bool)Sets if text rectangle border drawn flag.
set_Font(System::SharedPtr<Aspose::Pdf::Text::Font>) overrideSets font of the text, represented by the TextFragment object.
set_FontSize(float) overrideSets font size of the text, represented by the TextFragment object.
set_FontStyle(FontStyles) overrideSets font style of the text, represented by the TextFragment object.
set_ForegroundColor(System::SharedPtr<Color>) overrideSets foreground color of the text, represented by the TextFragment object.
set_FormattingOptions(System::SharedPtr<TextFormattingOptions>)Sets formatting options. Setting of the options will be effective in generator scenarios only.
set_HorizontalAlignment(Aspose::Pdf::HorizontalAlignment) overrideSets horizontal alignment for the text.
set_HorizontalScaling(float) overrideSets horizontal scaling of the text, represented by the TextFragment object.
set_Invisible(bool) overrideSets invisibility of the text.
set_LineSpacing(float) overrideSets line spacing of the text.
set_RenderingMode(TextRenderingMode) overrideSets rendering mode of the text.
set_Rotation(double)Sets rotation angle in degrees.
set_StrikeOut(bool) overrideSets strikeout for the text, represented by the TextFragment object.
set_StrokingColor(System::SharedPtr<Color>) overrideSets color stroking operations of TextFragment rendering (stroke text, rectangle border)
set_Subscript(bool) overrideSets subscript of the text, represented by the TextFragment object.
set_Superscript(bool) overrideSets superscript of the text, represented by the TextFragment object.
set_Underline(bool) overrideSets underline for the text, represented by the TextFragment object.
set_WordSpacing(float) overrideSets word spacing of the text.
TextFragmentState(System::SharedPtr<TextFragment>)Initializes new instance of the TextFragmentState object with specified TextFragment object. This TextFragmentState initialization is not supported. TextFragmentState is only available with TextFragment::TextState property.
TextState()Creates text state object.
TextState(double)Creates text state object with font size specification.
TextState(System::Drawing::Color)Creates text state object with foreground color specification.
TextState(System::Drawing::Color, double)Creates text state object with foreground color and font size specification.
TextState(System::String)Creates text state object with font family specification.
TextState(System::String, bool, bool)Creates text state object with font family and font style specification.
TextState(System::String, double)Creates text state object with font family and font size specification.

Remarks

Provides a way to change following properties of the text: font (TextFragmentState::Font property) font size (TextFragmentState::FontSize property) font style (TextFragmentState::FontStyle property) foreground color (TextFragmentState::ForegroundColor property) background color (TextFragmentState::BackgroundColor property)

Note that changing TextFragmentState properties may change inner TextFragment::Segments collection because TextFragment is an aggregate object and it may rearrange internal segments or merge them into single segment. If your requirement is to leave the TextFragment::Segments collection unchanged, please change inner segments individually.

See Also