$.api("GdipCloneStringFormat","int(PTR strFmt,int& newFormat)")
$.api("GdipCreateStringFormat","int(int formatAttributes,word language,pointer& StringFormat)")
$.api("GdipDeleteStringFormat","int(PTR strFmt)")
$.api("GdipGetStringFormatAlign","int(PTR strFmt,int& align)")
$.api("GdipGetStringFormatFlags","int(PTR strFmt,int& flags)")
$.api("GdipGetStringFormatHotkeyPrefix","int(PTR strFmt,int& hkPrefix)")
$.api("GdipGetStringFormatLineAlign","int(PTR strFmt,int& align)")
$.api("GdipGetStringFormatTrimming","int(PTR strFmt,int& trimming)")
$.api("GdipSetStringFormatAlign","int(PTR strFmt,int align)")
$.api("GdipSetStringFormatFlags","int(PTR strFmt,int flags)")
$.api("GdipSetStringFormatHotkeyPrefix","int(PTR strFmt,int hkPrefix)")
$.api("GdipSetStringFormatLineAlign","int(PTR strFmt,int align)")
$.api("GdipSetStringFormatTrimming","int(PTR strFmt,int trimming)")
创建文本格式对象。
参数都是可选参数,默认值为0
获取默认的通用字串格式化对象。
具有 GDI+ 默认的文本边距和各种自动裁剪行为
支持制表符、热键符号、下划线
获取一个“通用印刷体”(Generic Typographic)的字串格式化对象
此对象可消除 GDI+ 默认的文本边距和各种自动裁剪行为,
提供了一个无 padding、像素级精确的文本格式化配置。
禁用制表符、热键符号(视作纯文本直接显示)。
gdipStringFormatObject.align = _GdipStringAlignment/*水平对齐*/ ;
删除对象
gdipStringFormatObject.flags = _GdipStringFormatFlags/*选项*/ ;
获取数字替换方法和对应于数字替换的语言。
返回 2 个值:langId,substitute ,参考 setDigitSubstitution 方法参数说明。
获取置此 StringFormat 对象中制表位的偏移量。
返回两个值:tabStops,offset 。
tabStops 为表示多个 \t 输出偏移量的数组。
offset 为起始偏移量,默认为 0
gdipStringFormatObject.hotkeyPrefix = _GdipHotkeyPrefix/*热键前缀的处理类型*/ ;
gdipStringFormatObject.lineAlign = _GdipStringAlignment/*垂直对齐*/ ;
设置数字替换方法和对应于数字替换的语言。
参数 @langId 指定 LANGID(数值),substitute 指定 _gdipStringDigitSubstitute 前缀枚举值(数值)
设置此 StringFormat 对象中制表位的偏移量,
也就是 \t 字符输出的跨度。
参数 @tabStops 应当指定数值数组,指定空值或空数组忽略不执行任何操作。
可选用参数 @offset 指定起始偏移量(默认为 0)
指定或获取制表位的偏移量数组
gdipStringFormatObject.trimming = _GdipStringTrimming/*剪裁样式,确定如何剪裁字符串使其适合布局矩形*/ ;
_gdipStringDigitSubstituteNational=2
_gdipStringDigitSubstituteNone=1
_gdipStringDigitSubstituteTraditional=3
_gdipStringDigitSubstituteUser=0