Rich text format document object model.(带有格式描述信息的文本文档的对象模型)
Rtf
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 1 | |
| SetFormat | 1 | Set format value to a selected region in the text document. |
| AppendText | 1 | Append the target text value on to the last region of the document with the specific text format.(向文档末尾追加一段带有格式标记的文本) |
| AppendLine | 2 | |
| __toRTF | 1 | 生成一个含有格式描述的文本文件,即将模型数据保存为rtf文档 |
| __getMetaDataStr | 1 | |
| Save | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| GlobalFormat | 1 | |
| Length | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| FontToken | 1 | {\f1\fnil\fcharset0 %font.name%;} |
05 Members
String, Int32, Color)| Name | Type | Description |
|---|---|---|
FontName | String | Font family name.(字体名称) |
Size | Int32 | Font size.(字体大小) |
Color | Color | Font Color.(字体颜色) |
Set format value to a selected region in the text document. the previous format which was exists on the target document region will be covered by the newly format FontStyle. (先前的格式会被后面设置的格式所覆盖)
目标区域start -> selectLength可能与某一个设置了字体的区域重合一部分,也可能完全包含有其他的多个区域
| Name | Type | Description |
|---|---|---|
start | Int32 | The region start location. |
selectLength | Int32 | The formated region text length. |
FontStyle | Font | The format will be applied on the target selected region. |
String, Font)Append the target text value on to the last region of the document with the specific text format.(向文档末尾追加一段带有格式标记的文本)
| Name | Type | Description |
|---|---|---|
text | String | - |
Format | Font | - |
String, Font)向文档末尾追加一行带有格式标记的文本
| Name | Type | Description |
|---|---|---|
text | String | - |
Format | Font | - |
生成一个含有格式描述的文本文件,即将模型数据保存为rtf文档
{ \rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052 { \fonttbl { \f0\fnil\fcharset0 Cambria; } } { \colortbl ;%cl_meta%; } { *\generator Msftedit 5.41.21.2510; }
{\f1\fnil\fcharset0 %font.name%;}
String, Encoding)