Foxit PDF SDK
foxit.pdf.annots.RichTextStyle Class Reference

Inherits SystemIDisposable.

Public Types

enum  CornerMarkStyle { CornerMarkStyle.e_CornerMarkNone = 1, CornerMarkStyle.e_CornerMarkSuperscript = 2, CornerMarkStyle.e_CornerMarkSubscript = 3 }
 Enumeration for conermark style. More...
 

Public Member Functions

 RichTextStyle (Font font, float text_size, Alignment text_alignment, int text_color, bool is_bold, bool is_italic, bool is_underline, bool is_strikethrough, RichTextStyle.CornerMarkStyle mark_style)
 Constructor, with parameters. More...
 
 RichTextStyle ()
 Constructor.
 
 RichTextStyle (RichTextStyle style)
 Constructor, with another style object. More...
 
void Set (Font font, float text_size, Alignment text_alignment, int text_color, bool is_bold, bool is_italic, bool is_underline, bool is_strikethrough, RichTextStyle.CornerMarkStyle mark_style)
 Set value. More...
 

Properties

Fontfont [get, set]
 A font used in rich text style. It should be a valid font object. More...
 
bool is_bold [get, set]
 A boolean value which indicates whether to make text bold or not.
 
bool is_italic [get, set]
 A boolean value which indicates whether to italicize text or not.
 
bool is_strikethrough [get, set]
 A boolean value which indicates whether to cross text out with strike through or not.
 
bool is_underline [get, set]
 A boolean value which indicates whether to underline text or not.
 
RichTextStyle.CornerMarkStyle mark_style [get, set]
 Corner mark style. Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from foxit.pdf.annots.RichTextStyle.CornerMarkStyle.e_CornerMarkNone and this should be one of these values.
 
Alignment text_alignment [get, set]
 Alignment value. Please refer to values starting from foxit.common.Alignment.e_AlignmentLeft and this should be one of these values.
 
int text_color [get, set]
 Text color. Format: 0xRRGGBB.
 
float text_size [get, set]
 Text size. It should not be negative value. 0 means text will not be shown.
 

Detailed Description

This class represents rich text style data, which is used to specify the style of rich text.

Member Enumeration Documentation

◆ CornerMarkStyle

Enumeration for conermark style.

Values of this enumeration should be used alone.

Enumerator
e_CornerMarkNone 

Corner mark style: none.

e_CornerMarkSuperscript 

Corner mark style: superscript.

e_CornerMarkSubscript 

Corner mark style: subscript.

Constructor & Destructor Documentation

◆ RichTextStyle() [1/2]

foxit.pdf.annots.RichTextStyle.RichTextStyle ( Font  font,
float  text_size,
Alignment  text_alignment,
int  text_color,
bool  is_bold,
bool  is_italic,
bool  is_underline,
bool  is_strikethrough,
RichTextStyle.CornerMarkStyle  mark_style 
)
inline

Constructor, with parameters.

Parameters
[in]fontA valid font object.
[in]text_sizeText size. It should not be negative value. 0 means text will not be shown.
[in]text_alignmentAlignment value. Please refer to values starting from foxit.common.Alignment.e_AlignmentLeft and this should be one of these values.
[in]text_colorText color. Format: 0xRRGGBB.
[in]is_boldA boolean value which indicates whether to make text bold or not.
[in]is_italicA boolean value which indicates whether to italicize text or not.
[in]is_underlineA boolean value which indicates whether to underline text or not.
[in]is_strikethroughA boolean value which indicates whether to cross text out with strike through or not.
[in]mark_styleCorner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from foxit.pdf.annots.RichTextStyle.CornerMarkStyle.e_CornerMarkNone and this should be one of these values.

◆ RichTextStyle() [2/2]

foxit.pdf.annots.RichTextStyle.RichTextStyle ( RichTextStyle  style)
inline

Constructor, with another style object.

Parameters
[in]styleAnother style object.

Member Function Documentation

◆ Set()

void foxit.pdf.annots.RichTextStyle.Set ( Font  font,
float  text_size,
Alignment  text_alignment,
int  text_color,
bool  is_bold,
bool  is_italic,
bool  is_underline,
bool  is_strikethrough,
RichTextStyle.CornerMarkStyle  mark_style 
)
inline

Set value.

Parameters
[in]fontA valid font object.
[in]text_sizeText size. It should not be negative value. 0 means text will not be shown.
[in]text_alignmentAlignment value. Please refer to values starting from foxit.common.Alignment.e_AlignmentLeft and this should be one of these values.
[in]text_colorText color. Format: 0xRRGGBB.
[in]is_boldA boolean value which indicates whether to make text bold or not.
[in]is_italicA boolean value which indicates whether to italicize text or not.
[in]is_underlineA boolean value which indicates whether to underline text or not.
[in]is_strikethroughA boolean value which indicates whether to cross text out with strike through or not.
[in]mark_styleCorner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from foxit.pdf.annots.RichTextStyle.CornerMarkStyle.e_CornerMarkNone and this should be one of these values.
Returns
None.

Property Documentation

◆ font

Font foxit.pdf.annots.RichTextStyle.font
getset

A font used in rich text style. It should be a valid font object.

  • When current style is used to set a rich text or add/insert a new rich text, this font means "user expects to use this font for a rich text". Then during resetting appearance process, Foxit PDF SDK will check if the expected font is suitable and decide to use it or change to a more suitable font for showing text content.

  • When current style is retrieved from a rich text, this font reprensets the used font of a rich text.