Foxit PDF SDK
com.foxit.sdk.pdf.annots.RichTextStyle类 参考

Public 成员函数

 RichTextStyle (Font font, float text_size, int text_alignment, long text_color, boolean is_bold, boolean is_italic, boolean is_underline, boolean is_strikethrough, int mark_style, float char_space, float word_space)
 构造函数,带参数。 更多...
 
 RichTextStyle ()
 构造函数。
 
 RichTextStyle (RichTextStyle style)
 构造函数,使用另一个样式对象。 更多...
 
synchronized void delete ()
 直接清除C++相关资源。 更多...
 
float getChar_space ()
 Get 字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。 更多...
 
Font getFont ()
 Get 富文本样式中使用的字体。应该是有效的字体对象。 更多...
 
boolean getIs_bold ()
 Get 指示是否将文本设为粗体的布尔值。 更多...
 
boolean getIs_italic ()
 Get 指示是否将文本设为斜体的布尔值。 更多...
 
boolean getIs_strikethrough ()
 Get 指示是否为文本添加删除线的布尔值。 更多...
 
boolean getIs_underline ()
 Get 指示是否为文本添加下划线的布尔值。 更多...
 
int getMark_style ()
 Get 角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。 更多...
 
int getText_alignment ()
 Get 对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。 更多...
 
long getText_color ()
 Get 文本颜色。格式:0xRRGGBB。 更多...
 
float getText_size ()
 Get 文本大小。不应为负值。0表示文本不会显示。 更多...
 
float getWord_space ()
 Get 单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。 更多...
 
void set (Font font, float text_size, int text_alignment, long text_color, boolean is_bold, boolean is_italic, boolean is_underline, boolean is_strikethrough, int mark_style, float char_space, float word_space)
 设置值。 更多...
 
void setChar_space (float value)
 Set 字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。 更多...
 
void setFont (Font value)
 Set 富文本样式中使用的字体。应该是有效的字体对象。 更多...
 
void setIs_bold (boolean value)
 Set 指示是否将文本设为粗体的布尔值。 更多...
 
void setIs_italic (boolean value)
 Set 指示是否将文本设为斜体的布尔值。 更多...
 
void setIs_strikethrough (boolean value)
 Set 指示是否为文本添加删除线的布尔值。 更多...
 
void setIs_underline (boolean value)
 Set 指示是否为文本添加下划线的布尔值。 更多...
 
void setMark_style (int value)
 Set 角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。 更多...
 
void setText_alignment (int value)
 Set 对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。 更多...
 
void setText_color (long value)
 Set 文本颜色。格式:0xRRGGBB。 更多...
 
void setText_size (float value)
 Set 文本大小。不应为负值。0表示文本不会显示。 更多...
 
void setWord_space (float value)
 Set 单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。 更多...
 

静态 Public 属性

static final int e_CornerMarkNone = 1
 角标样式:无。
 
static final int e_CornerMarkSubscript = 3
 角标样式:下标。
 
static final int e_CornerMarkSuperscript = 2
 角标样式:上标。
 

详细描述

此类表示富文本样式数据,用于指定富文本的样式。

构造及析构函数说明

◆ RichTextStyle() [1/2]

com.foxit.sdk.pdf.annots.RichTextStyle.RichTextStyle ( Font  font,
float  text_size,
int  text_alignment,
long  text_color,
boolean  is_bold,
boolean  is_italic,
boolean  is_underline,
boolean  is_strikethrough,
int  mark_style,
float  char_space,
float  word_space 
)

构造函数,带参数。

参数
[in]font有效的字体对象。
[in]text_size文本大小。不应为负值。0表示文本不会显示。
[in]text_alignment对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。
[in]text_color文本颜色。格式:0xRRGGBB。
[in]is_bold指示是否将文本设为粗体的布尔值。
[in]is_italic指示是否将文本设为斜体的布尔值。
[in]is_underline指示是否为文本添加下划线的布尔值。
[in]is_strikethrough指示是否为文本添加删除线的布尔值。
[in]mark_style角标样式,可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值, 这应该是这些值中的一个。
[in]char_space字符间距。对于表格生成器,不应为负值。仅在pdf.PDFPage.addText 和表格生成器中使用。
[in]word_space单词间距。对于表格生成器,不应为负值。仅在pdf.PDFPage.addText 和表格生成器中使用。

◆ RichTextStyle() [2/2]

com.foxit.sdk.pdf.annots.RichTextStyle.RichTextStyle ( RichTextStyle  style)

构造函数,使用另一个样式对象。

参数
[in]style另一个样式对象。

成员函数说明

◆ delete()

synchronized void com.foxit.sdk.pdf.annots.RichTextStyle.delete ( )

直接清除C++相关资源。

返回
无。
注解
一旦这个接口被调用,这个对象将不能再被使用。

◆ getChar_space()

com.foxit.sdk.pdf.annots.RichTextStyle.getChar_space ( )

Get 字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

返回
字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

◆ getFont()

com.foxit.sdk.pdf.annots.RichTextStyle.getFont ( )

Get 富文本样式中使用的字体。应该是有效的字体对象。

  • 当当前样式用于设置富文本或添加/插入新富文本时,此字体表示"用户期望为富文本使用此字体"。 然后在重置外观过程中,Foxit PDF SDK将检查期望的字体是否合适,并决定使用它或 更改为更合适的字体以显示文本内容。

  • 当从富文本中检索当前样式时,此字体表示富文本的已使用字体。

返回
富文本样式中使用的字体。应该是有效的字体对象。

◆ getIs_bold()

com.foxit.sdk.pdf.annots.RichTextStyle.getIs_bold ( )

Get 指示是否将文本设为粗体的布尔值。

返回
指示是否将文本设为粗体的布尔值。

◆ getIs_italic()

com.foxit.sdk.pdf.annots.RichTextStyle.getIs_italic ( )

Get 指示是否将文本设为斜体的布尔值。

返回
指示是否将文本设为斜体的布尔值。

◆ getIs_strikethrough()

com.foxit.sdk.pdf.annots.RichTextStyle.getIs_strikethrough ( )

Get 指示是否为文本添加删除线的布尔值。

返回
指示是否为文本添加删除线的布尔值。

◆ getIs_underline()

com.foxit.sdk.pdf.annots.RichTextStyle.getIs_underline ( )

Get 指示是否为文本添加下划线的布尔值。

返回
指示是否为文本添加下划线的布尔值。

◆ getMark_style()

com.foxit.sdk.pdf.annots.RichTextStyle.getMark_style ( )

Get 角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。

返回
角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。

◆ getText_alignment()

com.foxit.sdk.pdf.annots.RichTextStyle.getText_alignment ( )

Get 对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。

返回
对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。

◆ getText_color()

com.foxit.sdk.pdf.annots.RichTextStyle.getText_color ( )

Get 文本颜色。格式:0xRRGGBB。

返回
文本颜色。格式:0xRRGGBB。

◆ getText_size()

com.foxit.sdk.pdf.annots.RichTextStyle.getText_size ( )

Get 文本大小。不应为负值。0表示文本不会显示。

返回
文本大小。不应为负值。0表示文本不会显示。

◆ getWord_space()

com.foxit.sdk.pdf.annots.RichTextStyle.getWord_space ( )

Get 单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

返回
单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

◆ set()

void com.foxit.sdk.pdf.annots.RichTextStyle.set ( Font  font,
float  text_size,
int  text_alignment,
long  text_color,
boolean  is_bold,
boolean  is_italic,
boolean  is_underline,
boolean  is_strikethrough,
int  mark_style,
float  char_space,
float  word_space 
)

设置值。

参数
[in]font有效的字体对象。
[in]text_size文本大小。不应为负值。0表示文本不会显示。
[in]text_alignment对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。
[in]text_color文本颜色。格式:0xRRGGBB。
[in]is_bold指示是否将文本设为粗体的布尔值。
[in]is_italic指示是否将文本设为斜体的布尔值。
[in]is_underline指示是否为文本添加下划线的布尔值。
[in]is_strikethrough指示是否为文本添加删除线的布尔值。
[in]mark_style角标样式,可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值, 这应该是这些值中的一个。
[in]char_space字符间距。对于表格生成器,不应为负值。仅在pdf.PDFPage.addText 中使用。
[in]word_space单词间距。对于表格生成器,不应为负值。仅在pdf.PDFPage.addText 中使用。
返回
无。

◆ setChar_space()

com.foxit.sdk.pdf.annots.RichTextStyle.setChar_space ( float  value)

Set 字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

参数
[in]value字符间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。
返回
None.

◆ setFont()

com.foxit.sdk.pdf.annots.RichTextStyle.setFont ( Font  value)

Set 富文本样式中使用的字体。应该是有效的字体对象。

  • 当当前样式用于设置富文本或添加/插入新富文本时,此字体表示"用户期望为富文本使用此字体"。 然后在重置外观过程中,Foxit PDF SDK将检查期望的字体是否合适,并决定使用它或 更改为更合适的字体以显示文本内容。

  • 当从富文本中检索当前样式时,此字体表示富文本的已使用字体。

参数
[in]value富文本样式中使用的字体。应该是有效的字体对象。
返回
None.

◆ setIs_bold()

com.foxit.sdk.pdf.annots.RichTextStyle.setIs_bold ( boolean  value)

Set 指示是否将文本设为粗体的布尔值。

参数
[in]value指示是否将文本设为粗体的布尔值。
返回
None.

◆ setIs_italic()

com.foxit.sdk.pdf.annots.RichTextStyle.setIs_italic ( boolean  value)

Set 指示是否将文本设为斜体的布尔值。

参数
[in]value指示是否将文本设为斜体的布尔值。
返回
None.

◆ setIs_strikethrough()

com.foxit.sdk.pdf.annots.RichTextStyle.setIs_strikethrough ( boolean  value)

Set 指示是否为文本添加删除线的布尔值。

参数
[in]value指示是否为文本添加删除线的布尔值。
返回
None.

◆ setIs_underline()

com.foxit.sdk.pdf.annots.RichTextStyle.setIs_underline ( boolean  value)

Set 指示是否为文本添加下划线的布尔值。

参数
[in]value指示是否为文本添加下划线的布尔值。
返回
None.

◆ setMark_style()

com.foxit.sdk.pdf.annots.RichTextStyle.setMark_style ( int  value)

Set 角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。

参数
[in]value角标样式。角标样式可用于将文本设为上标或下标或不作为任何类型的角标。 请参考从com.foxit.sdk.pdf.annots.RichTextStyle.e_CornerMarkNone 开始的值,这应该是这些值中的一个。
返回
None.

◆ setText_alignment()

com.foxit.sdk.pdf.annots.RichTextStyle.setText_alignment ( int  value)

Set 对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。

参数
[in]value对齐值。请参考从com.foxit.sdk.common.Constants.e_AlignmentLeft 开始的值, 这应该是这些值中的一个。
返回
None.

◆ setText_color()

com.foxit.sdk.pdf.annots.RichTextStyle.setText_color ( long  value)

Set 文本颜色。格式:0xRRGGBB。

参数
[in]value文本颜色。格式:0xRRGGBB。
返回
None.

◆ setText_size()

com.foxit.sdk.pdf.annots.RichTextStyle.setText_size ( float  value)

Set 文本大小。不应为负值。0表示文本不会显示。

参数
[in]value文本大小。不应为负值。0表示文本不会显示。
返回
None.

◆ setWord_space()

com.foxit.sdk.pdf.annots.RichTextStyle.setWord_space ( float  value)

Set 单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。

参数
[in]value单词间距。对于表格生成器不应为负值。仅在pdf.PDFPage.addText 中使用。
返回
None.