StringFormat 类

Summary: Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features. This class cannot be inherited.

Module: aspose.imaging

Full Name: aspose.imaging.StringFormat

Inheritance: DisposableObject

Constructors

Name描述
StringFormat()初始化一个新的 StringFormat 对象。
StringFormat(format)从指定的现有 StringFormat 对象初始化一个新的 StringFormat 对象。
StringFormat(options)使用指定的 StringFormatFlags 枚举和语言初始化一个新的 StringFormat 对象。

Properties

NameTypeAccess描述
alignmentStringAlignmentr/w获取或设置垂直平面上的文本对齐信息。
custom_char_identPointFr/w获取或设置自定义字符标识。
digit_substitution_languageintr/w获取或设置在本地数字替换为西方数字时使用的语言。
digit_substitution_methodStringDigitSubstituter/w获取或设置用于数字替换的方法。
disposedboolr获取一个值,指示此实例是否已释放。
first_tab_offsetfloatr获取文本行起始处与第一个制表位之间的空格数。
format_flagsStringFormatFlagsr/w获取或设置包含格式信息的 StringFormatFlags 枚举。
generic_default [static]StringFormatr获取通用默认的 StringFormat 对象。
generic_typographic [static]StringFormatr获取通用排版的 StringFormat 对象。
hotkey_prefixHotkeyPrefixr/w获取或设置此 StringFormat 对象的 HotkeyPrefix 对象。
line_alignmentStringAlignmentr/w获取或设置水平平面上的行对齐方式。
tab_stopsfloat[]r获取由 Graphics.page_unit 属性指定单位的制表位之间距离的数组。
trimmingStringTrimmingr/w获取或设置此 StringFormat 对象的 StringTrimming 枚举。

Methods

Name描述
create_from_flags(options)使用指定的 StringFormatFlags 枚举和语言初始化一个新的 StringFormat 对象。
create_from_format(format)从指定的现有 StringFormat 对象初始化一个新的 StringFormat 对象。
deep_clone()创建此 StringFormat 对象的深度克隆。
set_tab_stops(first_tab_offset, tab_stops)为此 StringFormat 对象设置制表位。

Constructor: StringFormat()

 StringFormat() 

初始化一个新的 StringFormat 对象。

Constructor: StringFormat(format)

 StringFormat(format) 

从指定的现有 StringFormat 对象初始化一个新的 StringFormat 对象。

Parameters:

参数TypeDescription
formatStringFormat用于初始化新 StringFormat 对象的 StringFormat 对象。

Constructor: StringFormat(options)

 StringFormat(options) 

使用指定的 StringFormatFlags 枚举和语言初始化一个新的 StringFormat 对象。

Parameters:

参数TypeDescription
optionsStringFormatFlagsStringFormat 对象的 StringFormatFlags 枚举。

Method: create_from_flags(options) [static]

 create_from_flags(options) 

使用指定的 StringFormatFlags 枚举和语言初始化一个新的 StringFormat 对象。

Parameters:

参数TypeDescription
optionsStringFormatFlagsStringFormat 对象的 StringFormatFlags 枚举。

Returns

TypeDescription
StringFormat

Method: create_from_format(format) [static]

 create_from_format(format) 

从指定的现有 StringFormat 对象初始化一个新的 StringFormat 对象。

Parameters:

参数TypeDescription
formatStringFormat用于初始化新 StringFormat 对象的 StringFormat 对象。

Returns

TypeDescription
StringFormat

Method: deep_clone()

 deep_clone() 

创建此 StringFormat 对象的深度克隆。

Returns

TypeDescription
StringFormat当前 StringFormat 的深度克隆。

Method: set_tab_stops(first_tab_offset, tab_stops)

 set_tab_stops(first_tab_offset, tab_stops) 

为此 StringFormat 对象设置制表位。

Parameters:

参数TypeDescription
first_tab_offsetfloat文本行起始处与第一个制表位之间的空格数。
tab_stopsfloat[]一个数组,表示制表位之间的距离,单位由 Graphics.page_unit 属性指定。