Aspose::Pdf::Text::TextFragmentState Class Referencefinal

Represents a text state of a text fragment. More...

Inherits Aspose::Pdf::Text::TextState.

Public Member Functions

virtual float get_CharacterSpacing ()
 Gets character spacing of the text, represented by the TextFragment object. More...
 
virtual void set_CharacterSpacing (float value)
 Sets character spacing of the text, represented by the TextFragment object. More...
 
virtual float get_HorizontalScaling ()
 Gets horizontal scaling of the text, represented by the TextFragment object. More...
 
virtual void set_HorizontalScaling (float value)
 Sets horizontal scaling of the text, represented by the TextFragment object. More...
 
virtual float get_WordSpacing ()
 Gets word spacing of the text. More...
 
virtual void set_WordSpacing (float value)
 Sets word spacing of the text. More...
 
virtual bool get_Invisible ()
 Gets invisibility of the text. More...
 
virtual void set_Invisible (bool value)
 Sets invisibility of the text. More...
 
virtual TextRenderingMode get_RenderingMode ()
 Gets rendering mode of the text. More...
 
virtual void set_RenderingMode (TextRenderingMode value)
 Sets rendering mode of the text. More...
 
virtual bool get_Subscript ()
 Gets subscript of the text, represented by the TextFragment object. More...
 
virtual void set_Subscript (bool value)
 Sets subscript of the text, represented by the TextFragment object. More...
 
virtual bool get_Superscript ()
 Gets superscript of the text, represented by the TextFragment object. More...
 
virtual void set_Superscript (bool value)
 Sets superscript of the text, represented by the TextFragment object. More...
 
System::SharedPtr< Aspose::Pdf::Text::TabStopsget_TabStops () const
 Gets tabstops for the text. More...
 
virtual float get_LineSpacing ()
 Gets line spacing of the text. More...
 
virtual void set_LineSpacing (float value)
 Sets line spacing of the text. More...
 
virtual System::SharedPtr< Colorget_ForegroundColor ()
 Gets foreground color of the text, represented by the TextFragment object More...
 
virtual void set_ForegroundColor (System::SharedPtr< Color > value)
 Sets foreground color of the text, represented by the TextFragment object More...
 
virtual System::SharedPtr< Colorget_StrokingColor ()
 Gets color stroking operations of TextFragment rendering (stroke text, rectangle border) More...
 
virtual void set_StrokingColor (System::SharedPtr< Color > value)
 Sets color stroking operations of TextFragment rendering (stroke text, rectangle border) More...
 
virtual System::SharedPtr< Colorget_BackgroundColor ()
 Sets background color of the text, represented by the TextFragment object More...
 
virtual void set_BackgroundColor (System::SharedPtr< Color > value)
 Sets background color of the text, represented by the TextFragment object More...
 
virtual bool get_Underline ()
 Gets underline for the text, represented by the TextFragment object More...
 
virtual void set_Underline (bool value)
 Sets underline for the text, represented by the TextFragment object More...
 
virtual void set_StrikeOut (bool value)
 Sets strikeout for the text, represented by the TextFragment object More...
 
virtual FontStyles get_FontStyle ()
 Sets font style of the text, represented by the TextFragment object More...
 
virtual void set_FontStyle (FontStyles value)
 Sets font style of the text, represented by the TextFragment object More...
 
virtual System::SharedPtr< Aspose::Pdf::Text::Fontget_Font ()
 Gets font of the text, represented by the TextFragment object More...
 
virtual void set_Font (System::SharedPtr< Aspose::Pdf::Text::Font > value)
 Sets font of the text, represented by the TextFragment object More...
 
virtual float get_FontSize ()
 Gets font size of the text, represented by the TextFragment object More...
 
virtual void set_FontSize (float value)
 Sets font size of the text, represented by the TextFragment object More...
 
virtual Aspose::Pdf::HorizontalAlignment get_HorizontalAlignment ()
 Gets horizontal alignment for the text. More...
 
virtual void set_HorizontalAlignment (Aspose::Pdf::HorizontalAlignment value)
 Sets horizontal alignment for the text. More...
 
System::SharedPtr< TextFormattingOptionsget_FormattingOptions () const
 Gets formatting options. Setting of the options will be effective in generator scenarios only. More...
 
void set_FormattingOptions (System::SharedPtr< TextFormattingOptions > value)
 Sets formatting options. Setting of the options will be effective in generator scenarios only. More...
 
double get_Rotation ()
 Gets rotation angle in degrees. More...
 
void set_Rotation (double value)
 Sets rotation angle in degrees. More...
 
bool get_DrawTextRectangleBorder () const
 
void set_DrawTextRectangleBorder (bool value)
 
virtual double MeasureString (System::String str)
 Measures the string. More...
 
 TextFragmentState (System::SharedPtr< TextFragment > fragment)
 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. More...
 
virtual void ApplyChangesFrom (System::SharedPtr< TextState > textState)
 Applies settings from another textState. More...
 
- Public Member Functions inherited from Aspose::Pdf::Text::TextState
virtual bool get_StrikeOut ()
 Sets strikeout for the text, represented by the TextFragment object More...
 
 TextState ()
 Creates text state object. More...
 
 TextState (double fontSize)
 Creates text state object with font size specification. More...
 
 TextState (System::Drawing::Color foregroundColor)
 Creates text state object with foreground color specification. More...
 
 TextState (System::Drawing::Color foregroundColor, double fontSize)
 Creates text state object with foreground color and font size specification. More...
 
 TextState (System::String fontFamily)
 Creates text state object with font family specification. More...
 
 TextState (System::String fontFamily, bool bold, bool italic)
 Creates text state object with font family and font style specification. More...
 
 TextState (System::String fontFamily, double fontSize)
 Creates text state object with font family and font size specification. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

System::SharedPtr< TextFragmentget_Fragment () const
 
void set_Fragment (System::SharedPtr< TextFragment > value)
 
virtual System::SharedPtr< Matrixget_TextMatrix ()
 
virtual void set_TextMatrix (System::SharedPtr< Matrix > value)
 
virtual bool get_IsTextWithPositions ()
 indicates whether TextWithPositions (TJ) operator must be used More...
 
virtual void set_IsTextWithPositions (bool value)
 indicates whether TextWithPositions (TJ) operator must be used More...
 
virtual System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, double > > get_Adjustments ()
 contains adjustments for TextWithPositions (TJ) operator More...
 
virtual void set_Adjustments (System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, double >> value)
 contains adjustments for TextWithPositions (TJ) operator More...
 
bool get_IsBBoxFontSizeCoefficientApplied () const
 Gets / sets a value indicates that text bounding box height will be enlarged by PhysicalTextSegment.BBoxFontSizeCoefficient. Default is true. Please don't change this default. Set value to false to avoide text rectangle intersection with nearest objects in the case of problems. More...
 
void set_IsBBoxFontSizeCoefficientApplied (bool value)
 Gets / sets a value indicates that text bounding box height will be enlarged by PhysicalTextSegment.BBoxFontSizeCoefficient. Default is true. Please don't change this default. Set value to false to avoide text rectangle intersection with nearest objects in the case of problems. More...
 
bool get_IsSingleState () const
 Gets a value that indicates that all child TextSegment objects have the same state (font, font size, foreground color etc.) Not supported yet. More...
 
void set_TabStops (System::SharedPtr< Aspose::Pdf::Text::TabStops > value)
 Gets tabstops for the text. More...
 
virtual Aspose::Pdf::VerticalAlignment get_VerticalAlignment ()
 Gets vertical alignment for the text inside paragrph's Rectangle. More...
 
virtual void set_VerticalAlignment (Aspose::Pdf::VerticalAlignment value)
 Sets vertical alignment for the text inside paragrph's Rectangle. More...
 
virtual float get_TextHeight ()
 Gets text height, represented by the TextFragment object More...
 
virtual Aspose::Pdf::Engine::CommonData::Text::Segmenting::CoordinateOrigin get_coordinateOrigin ()
 AB: At the moment, it is only effective if set earlier than physical segments will be attached More...
 
virtual void set_coordinateOrigin (Aspose::Pdf::Engine::CommonData::Text::Segmenting::CoordinateOrigin value)
 AB: At the moment, it is only effective if set earlier than physical segments will be attached More...
 
void ApplyChangesFrom (System::SharedPtr< TextState > textState, bool groupChangesOnly)
 Applies settings from another textState More...
 
void Attach (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::TextSegmenter > segmenter)
 
void SyncVerticalAlignment (Aspose::Pdf::VerticalAlignment verticalAlignment)
 
void SyncHorizontalAlignment (Aspose::Pdf::HorizontalAlignment horizontalAlignment)
 
void Disconnect ()
 
- Protected Member Functions inherited from Aspose::Pdf::Text::TextState
bool get_underline () const
 underline More...
 
void set_underline (bool value)
 underline More...
 
bool get_strikeout () const
 strikeout More...
 
void set_strikeout (bool value)
 strikeout More...
 
bool get_superscript () const
 superscript More...
 
void set_superscript (bool value)
 superscript More...
 
bool get_subscript () const
 subscript More...
 
void set_subscript (bool value)
 subscript More...
 
System::SharedPtr< Colorget_backgroundColor () const
 background color More...
 
void set_backgroundColor (System::SharedPtr< Color > value)
 background color More...
 
float get_characterSpacing () const
 character spacing More...
 
void set_characterSpacing (float value)
 character spacing More...
 
float get_lineSpacing () const
 character spacing More...
 
void set_lineSpacing (float value)
 character spacing More...
 
System::SharedPtr< Aspose::Pdf::Text::Fontget_font () const
 font More...
 
void set_font (System::SharedPtr< Aspose::Pdf::Text::Font > value)
 font More...
 
System::SharedPtr< Matrixget_textMatrix () const
 text matrix More...
 
void set_textMatrix (System::SharedPtr< Matrix > value)
 text matrix More...
 
float get_wordSpacing () const
 word spacing More...
 
void set_wordSpacing (float value)
 word spacing More...
 
bool get_invisible () const
 text invisibility More...
 
void set_invisible (bool value)
 text invisibility More...
 
TextRenderingMode get_renderingMode () const
 text rendering mode More...
 
void set_renderingMode (TextRenderingMode value)
 text rendering mode More...
 
FontStyles get_fontStyle () const
 font style More...
 
void set_fontStyle (FontStyles value)
 font style More...
 
float get_fontSize () const
 font size More...
 
void set_fontSize (float value)
 font size More...
 
bool get_isTextWithPositions () const
 please don't set this, use IsTextWithPositions More...
 
void set_isTextWithPositions (bool value)
 please don't set this, use IsTextWithPositions More...
 
System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, double > > get_adjustments () const
 please don't set this, use Adjustments More...
 
void set_adjustments (System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, double >> value)
 please don't set this, use Adjustments More...
 
bool get_IsBackgroundColorSet ()
 
void set_IsBackgroundColorSet (bool value)
 
bool get_IsUnderlineSet ()
 
void set_IsUnderlineSet (bool value)
 
bool get_IsStrikeOutSet ()
 
void set_IsStrikeOutSet (bool value)
 
bool get_IsCharacterSpacingSet ()
 
void set_IsCharacterSpacingSet (bool value)
 
bool get_IsLineSpacingSet ()
 
void set_IsLineSpacingSet (bool value)
 
bool get_IsFontSet ()
 
void set_IsFontSet (bool value)
 
bool get_IsForegroundColorSet ()
 
void set_IsForegroundColorSet (bool value)
 
bool get_IsStrokingColorSet ()
 
void set_IsStrokingColorSet (bool value)
 
bool get_IsHorizontalScalingSet ()
 
void set_IsHorizontalScalingSet (bool value)
 
bool get_IsTextMatrixSet ()
 
void set_IsTextMatrixSet (bool value)
 
bool get_IsWordSpacingSet ()
 
void set_IsWordSpacingSet (bool value)
 
bool get_IsFontStyleSet ()
 
void set_IsFontStyleSet (bool value)
 
bool get_IsFontSizeSet ()
 
void set_IsFontSizeSet (bool value)
 
bool get_IsHorizontalAlignmentSet ()
 
void set_IsHorizontalAlignmentSet (bool value)
 
bool get_IsVerticalAlignmentSet ()
 
void set_IsVerticalAlignmentSet (bool value)
 
bool get_IsSubSuperscriptSet ()
 
void set_IsSubSuperscriptSet (bool value)
 
bool get_IsRenderingModeSet ()
 
void set_IsRenderingModeSet (bool value)
 
bool get_IsInvisibilitySet () const
 
void set_IsInvisibilitySet (bool value)
 
TextState::AttachState get_AttachedState () const
 the state is attached to real physical text segment More...
 
void set_AttachedState (TextState::AttachState value)
 the state is attached to real physical text segment More...
 
System::SharedPtr< Colorget_foregroundColor () const
 foreground color More...
 
void set_foregroundColor (System::SharedPtr< Color > value)
 foreground color More...
 
System::SharedPtr< Colorget_strokingColor () const
 stroking color More...
 
void set_strokingColor (System::SharedPtr< Color > value)
 stroking color More...
 
float get_horizontalScaling () const
 horizontal spacing (100 is by default) More...
 
void set_horizontalScaling (float value)
 horizontal spacing (100 is by default) More...
 
double get_TabstopShift () const
 Tabstop shift of position of text segment. It is calculated by TextFragment. Shouldn't set it directly if you don't sure. More...
 
void set_TabstopShift (double value)
 Tabstop shift of position of text segment. It is calculated by TextFragment. Shouldn't set it directly if you don't sure. More...
 
double get_TabLeaderLength () const
 Length of tab leader before text segment. It is calculated by TextFragment. Shouldn't set it directly if you don't sure. More...
 
void set_TabLeaderLength (double value)
 Length of tab leader before text segment. It is calculated by TextFragment. Shouldn't set it directly if you don't sure. More...
 
Aspose::Pdf::Text::TabLeaderType get_TabLeaderType () const
 Type of tab leader before text segment. More...
 
void set_TabLeaderType (Aspose::Pdf::Text::TabLeaderType value)
 Type of tab leader before text segment. More...
 
int32_t get_SetFlags () const
 
void set_SetFlags (int32_t value)
 
bool get_IsDefault ()
 
void Attach (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextSegment > physicalSegment)
 
void Detach ()
 
System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::IColor > ToEngineColorWithArea (System::SharedPtr< Color > color, System::SharedPtr< Rectangle > rect)
 
 TextState (System::SharedPtr< Color > backgroundColor, System::SharedPtr< Color > foregroundColor, FontStyles fontStyle, System::SharedPtr< Aspose::Pdf::Text::Font > font, float fontSize)
 
 TextState (System::Drawing::Color backgroundColor, System::Drawing::Color foregroundColor, FontStyles fontStyle, System::SharedPtr< Aspose::Pdf::Text::Font > font, float fontSize)
 
void SetColorWithArea (System::SharedPtr< Color > color, System::SharedPtr< Rectangle > rect)
 
void SetStrokingColorWithArea (System::SharedPtr< Color > color, System::SharedPtr< Rectangle > rect)
 
void UpdateUnderlineFromSource ()
 Searches for operators that used for orginizing text underline for current text block. If found it will be replaced for operators generated by our code. More...
 
 TextState (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::PhysicalTextState > physicalState)
 
virtual double CalculateFontSize (System::String str, System::SharedPtr< Rectangle > rect)
 Calculates the font size for the rectangle. More...
 
 TextState (System::SharedPtr< TextSegment > textSegment)
 Copying constructor Copies properties from PhysicalTextState More...
 
void Serialize (System::SharedPtr< System::Xml::XmlTextWriter > writer, System::String tagName)
 
void Deserialize (System::SharedPtr< System::Xml::XmlReader > reader)
 
virtual ~TextState ()
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 
- Public Attributes inherited from Aspose::Pdf::Text::TextState
System::String TabTag
 You can place this tag in text to declare tabulation. More...
 
float TabstopDefaultValue
 Default value of tabulation in widths of space character of default font. More...
 
- Protected Types inherited from Aspose::Pdf::Text::TextState
enum  AttachState { AttachState::Detached, AttachState::Attached, AttachState::Attaching }
 Enum for attached state of the objects More...
 
- Static Protected Member Functions inherited from Aspose::Pdf::Text::TextState
static System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::IColor > ToEngineColorCommon (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::IColor > originalColor, System::SharedPtr< Color > color)
 
static System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::IColor > ToEngineColor (System::SharedPtr< Color > color)
 
static System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::RGBColor > ColorToEngineRGB (System::SharedPtr< Color > color)
 
static System::SharedPtr< ColorEngineRGBToColor (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::RGBColor > color)
 
static System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::GrayColor > ColorToEngineGray (System::SharedPtr< Color > color)
 
static System::SharedPtr< ColorGrayToColor (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::GrayColor > color)
 
static System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::CMYKColor > ColorToEngineCMYK (System::SharedPtr< Color > color)
 
static System::SharedPtr< ColorCMYKToColor (System::SharedPtr< Aspose::Pdf::Engine::CommonData::Graphics::Colors::CMYKColor > color)
 
- Protected Attributes inherited from Aspose::Pdf::Text::TextState
System::EventHandler OnFontChanged
 
System::EventHandler OnFontSizeChanged
 

Detailed Description

Represents a text state of a text fragment.

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.

The example demonstrates how to change text color and font size of the text with TextState object.

// Open document
Document doc = new Document(@"D:\Tests\input.pdf");
// Create TextFragmentAbsorber object to find all "hello world" text occurrences
TextFragmentAbsorber absorber = new TextFragmentAbsorber("hello world");
// Accept the absorber for first page
doc.Pages[1].Accept(absorber);
// Change foreground color of the first text occurrence
absorber.TextFragments[1].TextState.ForegroundColor = Color.FromRgb(System.Drawing.Color.Red);
// Change font size of the first text occurrence
absorber.TextFragments[1].TextState.FontSize = 15;
// Save document
doc.Save(@"D:\Tests\output.pdf");
See also
TextFragmentAbsorber
See also
Document

Constructor & Destructor Documentation

◆ TextFragmentState()

Aspose::Pdf::Text::TextFragmentState::TextFragmentState ( System::SharedPtr< TextFragment fragment)

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.

Parameters
fragmentText fragment object.

Member Function Documentation

◆ ApplyChangesFrom() [1/2]

virtual void Aspose::Pdf::Text::TextFragmentState::ApplyChangesFrom ( System::SharedPtr< TextState textState)
virtual

Applies settings from another textState.

Only those properties will be copied that were changed explicitly.

Parameters
textStateText state object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ ApplyChangesFrom() [2/2]

void Aspose::Pdf::Text::TextFragmentState::ApplyChangesFrom ( System::SharedPtr< TextState textState,
bool  groupChangesOnly 
)
protected

Applies settings from another textState

Parameters
textStateText state object.
groupChangesOnlyif true inherit group changes only (without isolating the segments into single segment)

◆ Attach()

void Aspose::Pdf::Text::TextFragmentState::Attach ( System::SharedPtr< Aspose::Pdf::Engine::CommonData::Text::Segmenting::TextSegmenter >  segmenter)
protected

◆ Disconnect()

void Aspose::Pdf::Text::TextFragmentState::Disconnect ( )
protected

◆ get_Adjustments()

virtual System::SharedPtr<System::Collections::Generic::Dictionary<int32_t, double> > Aspose::Pdf::Text::TextFragmentState::get_Adjustments ( )
protectedvirtual

contains adjustments for TextWithPositions (TJ) operator

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_BackgroundColor()

virtual System::SharedPtr<Color> Aspose::Pdf::Text::TextFragmentState::get_BackgroundColor ( )
virtual

Sets background color of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_CharacterSpacing()

virtual float Aspose::Pdf::Text::TextFragmentState::get_CharacterSpacing ( )
virtual

Gets character spacing of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_coordinateOrigin()

virtual Aspose::Pdf::Engine::CommonData::Text::Segmenting::CoordinateOrigin Aspose::Pdf::Text::TextFragmentState::get_coordinateOrigin ( )
protectedvirtual

AB: At the moment, it is only effective if set earlier than physical segments will be attached

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_DrawTextRectangleBorder()

bool Aspose::Pdf::Text::TextFragmentState::get_DrawTextRectangleBorder ( ) const

◆ get_Font()

virtual System::SharedPtr<Aspose::Pdf::Text::Font> Aspose::Pdf::Text::TextFragmentState::get_Font ( )
virtual

Gets font of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_FontSize()

virtual float Aspose::Pdf::Text::TextFragmentState::get_FontSize ( )
virtual

Gets font size of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_FontStyle()

virtual FontStyles Aspose::Pdf::Text::TextFragmentState::get_FontStyle ( )
virtual

Sets font style of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_ForegroundColor()

virtual System::SharedPtr<Color> Aspose::Pdf::Text::TextFragmentState::get_ForegroundColor ( )
virtual

Gets foreground color of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_FormattingOptions()

System::SharedPtr<TextFormattingOptions> Aspose::Pdf::Text::TextFragmentState::get_FormattingOptions ( ) const

Gets formatting options. Setting of the options will be effective in generator scenarios only.

◆ get_Fragment()

System::SharedPtr<TextFragment> Aspose::Pdf::Text::TextFragmentState::get_Fragment ( ) const
protected

◆ get_HorizontalAlignment()

virtual Aspose::Pdf::HorizontalAlignment Aspose::Pdf::Text::TextFragmentState::get_HorizontalAlignment ( )
virtual

Gets horizontal alignment for the text.

HorizontalAlignment.None is equal to HorizontalAlignment.Left.

Note that TextFragmentState.VerticalAlignment property works in new document generation scenarios only.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_HorizontalScaling()

virtual float Aspose::Pdf::Text::TextFragmentState::get_HorizontalScaling ( )
virtual

Gets horizontal scaling of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_Invisible()

virtual bool Aspose::Pdf::Text::TextFragmentState::get_Invisible ( )
virtual

Gets invisibility of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_IsBBoxFontSizeCoefficientApplied()

bool Aspose::Pdf::Text::TextFragmentState::get_IsBBoxFontSizeCoefficientApplied ( ) const
protected

Gets / sets a value indicates that text bounding box height will be enlarged by PhysicalTextSegment.BBoxFontSizeCoefficient. Default is true. Please don't change this default. Set value to false to avoide text rectangle intersection with nearest objects in the case of problems.

◆ get_IsSingleState()

bool Aspose::Pdf::Text::TextFragmentState::get_IsSingleState ( ) const
protected

Gets a value that indicates that all child TextSegment objects have the same state (font, font size, foreground color etc.) Not supported yet.

◆ get_IsTextWithPositions()

virtual bool Aspose::Pdf::Text::TextFragmentState::get_IsTextWithPositions ( )
protectedvirtual

indicates whether TextWithPositions (TJ) operator must be used

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_LineSpacing()

virtual float Aspose::Pdf::Text::TextFragmentState::get_LineSpacing ( )
virtual

Gets line spacing of the text.

Note that the value is not preserved as a text characteristic within the document. The LineSpacing property getter works for an object in case it was explicitly set previously with LineSpacing setter for those object.

The property is used by runtime in context of current generation/modification process.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_RenderingMode()

virtual TextRenderingMode Aspose::Pdf::Text::TextFragmentState::get_RenderingMode ( )
virtual

Gets rendering mode of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_Rotation()

double Aspose::Pdf::Text::TextFragmentState::get_Rotation ( )

Gets rotation angle in degrees.

◆ get_StrokingColor()

virtual System::SharedPtr<Color> Aspose::Pdf::Text::TextFragmentState::get_StrokingColor ( )
virtual

Gets color stroking operations of TextFragment rendering (stroke text, rectangle border)

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_Subscript()

virtual bool Aspose::Pdf::Text::TextFragmentState::get_Subscript ( )
virtual

Gets subscript of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_Superscript()

virtual bool Aspose::Pdf::Text::TextFragmentState::get_Superscript ( )
virtual

Gets superscript of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_TabStops()

System::SharedPtr<Aspose::Pdf::Text::TabStops> Aspose::Pdf::Text::TextFragmentState::get_TabStops ( ) const

Gets tabstops for the text.

Note that Tabstops property works in new document generation scenarios only. Tabstops may be added during TextFragment initialization. Tabstops must be constructed before the text.

◆ get_TextHeight()

virtual float Aspose::Pdf::Text::TextFragmentState::get_TextHeight ( )
protectedvirtual

Gets text height, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_TextMatrix()

virtual System::SharedPtr<Matrix> Aspose::Pdf::Text::TextFragmentState::get_TextMatrix ( )
protectedvirtual

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_Underline()

virtual bool Aspose::Pdf::Text::TextFragmentState::get_Underline ( )
virtual

Gets underline for the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_VerticalAlignment()

virtual Aspose::Pdf::VerticalAlignment Aspose::Pdf::Text::TextFragmentState::get_VerticalAlignment ( )
protectedvirtual

Gets vertical alignment for the text inside paragrph's Rectangle.

VerticalAlignment.None is equal to VerticalAlignment.Bottom.

Note that TextFragmentState.VerticalAlignment property works in new document generation scenarios only.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ get_WordSpacing()

virtual float Aspose::Pdf::Text::TextFragmentState::get_WordSpacing ( )
virtual

Gets word spacing of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ MeasureString()

virtual double Aspose::Pdf::Text::TextFragmentState::MeasureString ( System::String  str)
virtual

Measures the string.

Parameters
strThe string.
Returns

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Adjustments()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Adjustments ( System::SharedPtr< System::Collections::Generic::Dictionary< int32_t, double >>  value)
protectedvirtual

contains adjustments for TextWithPositions (TJ) operator

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_BackgroundColor()

virtual void Aspose::Pdf::Text::TextFragmentState::set_BackgroundColor ( System::SharedPtr< Color value)
virtual

Sets background color of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_CharacterSpacing()

virtual void Aspose::Pdf::Text::TextFragmentState::set_CharacterSpacing ( float  value)
virtual

Sets character spacing of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_coordinateOrigin()

virtual void Aspose::Pdf::Text::TextFragmentState::set_coordinateOrigin ( Aspose::Pdf::Engine::CommonData::Text::Segmenting::CoordinateOrigin  value)
protectedvirtual

AB: At the moment, it is only effective if set earlier than physical segments will be attached

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_DrawTextRectangleBorder()

void Aspose::Pdf::Text::TextFragmentState::set_DrawTextRectangleBorder ( bool  value)

◆ set_Font()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Font ( System::SharedPtr< Aspose::Pdf::Text::Font value)
virtual

Sets font of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_FontSize()

virtual void Aspose::Pdf::Text::TextFragmentState::set_FontSize ( float  value)
virtual

Sets font size of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_FontStyle()

virtual void Aspose::Pdf::Text::TextFragmentState::set_FontStyle ( FontStyles  value)
virtual

Sets font style of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_ForegroundColor()

virtual void Aspose::Pdf::Text::TextFragmentState::set_ForegroundColor ( System::SharedPtr< Color value)
virtual

Sets foreground color of the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_FormattingOptions()

void Aspose::Pdf::Text::TextFragmentState::set_FormattingOptions ( System::SharedPtr< TextFormattingOptions value)

Sets formatting options. Setting of the options will be effective in generator scenarios only.

◆ set_Fragment()

void Aspose::Pdf::Text::TextFragmentState::set_Fragment ( System::SharedPtr< TextFragment value)
protected

◆ set_HorizontalAlignment()

virtual void Aspose::Pdf::Text::TextFragmentState::set_HorizontalAlignment ( Aspose::Pdf::HorizontalAlignment  value)
virtual

Sets horizontal alignment for the text.

HorizontalAlignment.None is equal to HorizontalAlignment.Left.

Note that TextFragmentState.VerticalAlignment property works in new document generation scenarios only.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_HorizontalScaling()

virtual void Aspose::Pdf::Text::TextFragmentState::set_HorizontalScaling ( float  value)
virtual

Sets horizontal scaling of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Invisible()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Invisible ( bool  value)
virtual

Sets invisibility of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_IsBBoxFontSizeCoefficientApplied()

void Aspose::Pdf::Text::TextFragmentState::set_IsBBoxFontSizeCoefficientApplied ( bool  value)
protected

Gets / sets a value indicates that text bounding box height will be enlarged by PhysicalTextSegment.BBoxFontSizeCoefficient. Default is true. Please don't change this default. Set value to false to avoide text rectangle intersection with nearest objects in the case of problems.

◆ set_IsTextWithPositions()

virtual void Aspose::Pdf::Text::TextFragmentState::set_IsTextWithPositions ( bool  value)
protectedvirtual

indicates whether TextWithPositions (TJ) operator must be used

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_LineSpacing()

virtual void Aspose::Pdf::Text::TextFragmentState::set_LineSpacing ( float  value)
virtual

Sets line spacing of the text.

Note that the value is not preserved as a text characteristic within the document. The LineSpacing property getter works for an object in case it was explicitly set previously with LineSpacing setter for those object.

The property is used by runtime in context of current generation/modification process.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_RenderingMode()

virtual void Aspose::Pdf::Text::TextFragmentState::set_RenderingMode ( TextRenderingMode  value)
virtual

Sets rendering mode of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Rotation()

void Aspose::Pdf::Text::TextFragmentState::set_Rotation ( double  value)

Sets rotation angle in degrees.

◆ set_StrikeOut()

virtual void Aspose::Pdf::Text::TextFragmentState::set_StrikeOut ( bool  value)
virtual

Sets strikeout for the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_StrokingColor()

virtual void Aspose::Pdf::Text::TextFragmentState::set_StrokingColor ( System::SharedPtr< Color value)
virtual

Sets color stroking operations of TextFragment rendering (stroke text, rectangle border)

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Subscript()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Subscript ( bool  value)
virtual

Sets subscript of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Superscript()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Superscript ( bool  value)
virtual

Sets superscript of the text, represented by the TextFragment object.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_TabStops()

void Aspose::Pdf::Text::TextFragmentState::set_TabStops ( System::SharedPtr< Aspose::Pdf::Text::TabStops value)
protected

Gets tabstops for the text.

Note that Tabstops property works in new document generation scenarios only. Tabstops may be added during TextFragment initialization. Tabstops must be constructed before the text.

◆ set_TextMatrix()

virtual void Aspose::Pdf::Text::TextFragmentState::set_TextMatrix ( System::SharedPtr< Matrix value)
protectedvirtual

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_Underline()

virtual void Aspose::Pdf::Text::TextFragmentState::set_Underline ( bool  value)
virtual

Sets underline for the text, represented by the TextFragment object

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_VerticalAlignment()

virtual void Aspose::Pdf::Text::TextFragmentState::set_VerticalAlignment ( Aspose::Pdf::VerticalAlignment  value)
protectedvirtual

Sets vertical alignment for the text inside paragrph's Rectangle.

VerticalAlignment.None is equal to VerticalAlignment.Bottom.

Note that TextFragmentState.VerticalAlignment property works in new document generation scenarios only.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ set_WordSpacing()

virtual void Aspose::Pdf::Text::TextFragmentState::set_WordSpacing ( float  value)
virtual

Sets word spacing of the text.

Reimplemented from Aspose::Pdf::Text::TextState.

◆ SyncHorizontalAlignment()

void Aspose::Pdf::Text::TextFragmentState::SyncHorizontalAlignment ( Aspose::Pdf::HorizontalAlignment  horizontalAlignment)
protected

◆ SyncVerticalAlignment()

void Aspose::Pdf::Text::TextFragmentState::SyncVerticalAlignment ( Aspose::Pdf::VerticalAlignment  verticalAlignment)
protected