|
Foxit PDF SDK
|
Public 成员函数 | |
| FreeText () | |
| 构造函数。 | |
| FreeText (const Annot &annot) | |
| 构造函数,使用父类对象。 更多... | |
| ~FreeText () | |
| Destructor. | |
| void | AllowTextOverflow (bool is_text_overflow) |
| 决定是否允许自由文本的文本溢出。 更多... | |
| common::Alignment | GetAlignment () const |
| 获取对齐值。 更多... | |
| EndingStyle | GetCalloutLineEndingStyle () const |
| 获取标注线起点的线条结束样式。 更多... | |
| PointFArray | GetCalloutLinePoints () const |
| 获取标注线点。 更多... | |
| DefaultAppearance | GetDefaultAppearance () |
| 获取默认外观数据。 更多... | |
| RGB | GetFillColor () const |
| 获取填充颜色。 更多... | |
| RectF | GetInnerRect () const |
| 获取内部矩形。 更多... | |
| common::Rotation | GetRotation () |
| 获取当前旋转值(顺时针)。 更多... | |
| Matrix | GetTextMatrix () const |
| 获取当前自由文本注释中文本的默认外观数据中的矩阵。 更多... | |
| void | Rotate (common::Rotation rotation) |
| 从当前状态按指定旋转值(顺时针)旋转当前注释。 更多... | |
| void | SetAlignment (common::Alignment alignment) |
| 设置对齐值 更多... | |
| void | SetCalloutLineEndingStyle (EndingStyle ending_style) |
| 设置标注线起点的线条结束样式。 更多... | |
| void | SetCalloutLinePoints (const PointFArray &point_array) |
| 设置标注线的点。 更多... | |
| bool | SetDefaultAppearance (const DefaultAppearance &default_ap) |
| 设置默认外观数据。 更多... | |
| void | SetFillColor (RGB fill_color) |
| 设置填充颜色。 更多... | |
| void | SetInnerRect (const RectF &inner_rect) |
| 设置内部矩形。 更多... | |
| void | SetRotation (common::Rotation rotation) |
| 设置旋转值(顺时针)。 更多... | |
| void | SetTextMatrix (const Matrix &text_matrix) |
| 为当前自由文本注释中的文本设置默认外观数据中的矩阵。 更多... | |
Public 成员函数 继承自 foxit::pdf::annots::Markup | |
| Markup (const Annot &annot) | |
| 构造函数,使用父类对象。 更多... | |
| Markup () | |
| 构造函数 | |
| ~Markup () | |
| 析构函数。 | |
| Note | AddReply () |
| 在回复列表的末尾添加新回复。 更多... | |
| void | AddRichText (const WString &content, const RichTextStyle &style) |
| 在末尾添加新的富文本字符串。 更多... | |
| Note | AddStateAnnot (const WString &title, StateModel model, State state) |
| 添加新的状态注释。 更多... | |
| float | GetBorderOpacity () const |
| 获取注释的边框透明度。 更多... | |
| DateTime | GetCreationDateTime () const |
| 获取创建日期时间。 更多... | |
| float | GetFillOpacity () const |
| 获取注释的填充透明度。 更多... | |
| MarkupArray | GetGroupElements () |
| 从当前标记注释所属的组中获取一个元素(作为标记注释)。 更多... | |
| Markup | GetGroupHeader () |
| 获取当前标记注释所属组的头注释(作为主注释)。 更多... | |
| String | GetIntent () const |
| 获取意图名称。 更多... | |
| float | GetOpacity () const |
| 获取不透明度值。 更多... | |
| Popup | GetPopup () |
| 获取相关的弹出注释。 更多... | |
| Note | GetReply (int index) const |
| 按索引获取回复。 更多... | |
| int | GetReplyCount () |
| 计算所有回复。 更多... | |
| WString | GetRichTextContent (int32 index) |
| 获取指定索引的富文本字符串的文本字符串。 更多... | |
| int32 | GetRichTextCount () |
| 获取富文本字符串的数量。 更多... | |
| RichTextStyle | GetRichTextStyle (int32 index) |
| 获取指定索引的富文本字符串的样式数据。 更多... | |
| NoteArray | GetStateAnnots (StateModel model) |
| 获取指定状态模型中的所有状态注释。 更多... | |
| WString | GetSubject () const |
| 获取主题字符串。 更多... | |
| WString | GetTitle () const |
| 获取标题字符串。 更多... | |
| void | InsertRichText (int32 index, const WString &content, const RichTextStyle &style) |
| 在指定索引位置插入新的富文本字符串。 更多... | |
| bool | IsGrouped () |
| 检查当前标记注释是否在组中。 更多... | |
| bool | RemoveAllReplies () |
| 删除所有回复。 更多... | |
| bool | RemoveAllStateAnnots () |
| 移除所有状态注释。 更多... | |
| bool | RemovePopup () |
| 删除相关的弹出注释。 更多... | |
| bool | RemoveReply (int index) |
| 按索引删除回复。 更多... | |
| void | RemoveRichText (int index) |
| 移除指定索引的富文本字符串。 更多... | |
| void | SetBorderOpacity (float opacity) |
| 设置注释的边框透明度。 更多... | |
| void | SetCreationDateTime (const DateTime &date_time) |
| 设置创建日期时间。 更多... | |
| void | SetFillOpacity (float opacity) |
| 设置注释的填充透明度。 更多... | |
| void | SetIntent (const String &intent) |
| 设置意图名称。 更多... | |
| void | SetOpacity (float opacity) |
| 设置不透明度值。 更多... | |
| void | SetPopup (const Popup &popup) |
| 设置相关的弹出注释。 更多... | |
| void | SetRichTextContent (int32 index, const WString &content) |
| 设置指定索引的富文本字符串的文本字符串。 更多... | |
| void | SetRichTextStyle (int32 index, const RichTextStyle &style) |
| 设置指定索引的富文本字符串的样式数据。 更多... | |
| void | SetSubject (const WString &subject) |
| 设置主题字符串。 更多... | |
| void | SetTitle (const WString &title) |
| 设置标题字符串。 更多... | |
| bool | Ungroup () |
| 将当前标记注释从其所属的组中解组。 更多... | |
Public 成员函数 继承自 foxit::pdf::annots::Annot | |
| Annot (const PDFPage &page, objects::PDFDictionary *annot_dict) | |
| 构造函数,使用PDF页面和注释的PDF字典。 更多... | |
| Annot (const Annot &annot) | |
| 构造函数,使用另一个注释对象。 更多... | |
| Annot () | |
| 构造函数。 | |
| virtual | ~Annot () |
| 析构函数。 | |
| objects::PDFStream * | GetAppearanceStream (AppearanceType type, const char *appearance_state="") const |
| 获取具有指定类型和状态的注释外观流。 更多... | |
| RGB | GetBorderColor () const |
| 获取边框颜色。 更多... | |
| BorderInfo | GetBorderInfo () const |
| 获取边框信息。 更多... | |
| WString | GetContent () const |
| 获取内容。 更多... | |
| RectI | GetDeviceRect (const Matrix &matrix) |
| 获取设备坐标系统中的注释矩形。 更多... | |
| objects::PDFDictionary * | GetDict () const |
| 获取注释的字典对象。 更多... | |
| Matrix | GetDisplayMatrix (const Matrix &page_display_matrix) |
| 获取显示矩阵,从PDF坐标系统到 目标设备坐标系统。 更多... | |
| uint32 | GetFlags () const |
| 获取注释标志。 更多... | |
| int | GetIndex () const |
| 获取当前注释在其所属页面中的索引。 更多... | |
| DateTime | GetModifiedDateTime () const |
| 获取最后修改日期时间。 更多... | |
| objects::PDFDictionary * | GetOptionalContent () const |
| 获取注释可选内容的PDF字典。 更多... | |
| PDFPage | GetPage () const |
| 获取相关的PDF页面。 更多... | |
| RectF | GetRect () const |
| 获取矩形,以PDF坐标系统表示。 更多... | |
| Type | GetType () const |
| 获取当前注释的实际注释类型。 更多... | |
| WString | GetUniqueID () const |
| 获取唯一ID。 更多... | |
| bool | HasProperty (Property property) const |
| 当前注释是否具有指定的注释属性。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | IsMarkup () const |
| 检查当前注释是否为标记注释。 更多... | |
| bool | Move (const RectF &rect) |
| 将当前注释移动到新位置,由PDF坐标系统中的新矩形指定。 更多... | |
| bool | Move (const RectF &rect, bool is_reset_appearance) |
| 将当前注释移动到新位置,由PDF坐标系统中的新矩形指定。 更多... | |
| bool | operator != (const Annot &other) const |
| 不等于运算符。 更多... | |
| Annot & | operator= (const Annot &annot) |
| 赋值运算符。 更多... | |
| bool | operator== (const Annot &other) const |
| 等于运算符。 更多... | |
| bool | RemoveProperty (Property property) |
| 删除指定的注释属性。 更多... | |
| bool | ResetAppearanceStream () |
| 重置外观流。 更多... | |
| bool | ResetAppearanceStream (bool is_generate_new_appearance_obj) |
| 重置外观流。 更多... | |
| void | SetBorderColor (RGB color) |
| 设置边框颜色。 更多... | |
| void | SetBorderInfo (const BorderInfo &border) |
| 设置边框信息。 更多... | |
| void | SetContent (const WString &content) |
| 设置内容。 更多... | |
| void | SetFlags (uint32 flags) |
| 设置注释标志。 更多... | |
| void | SetModifiedDateTime (const DateTime &date_time) |
| 设置最后修改日期时间。 更多... | |
| void | SetUniqueID (const WString &unique_id) |
| 设置唯一ID。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
自由文本注释直接在页面上显示文本。因此自由文本注释不需要相关的弹出注释来显示文本。
自由文本注释是一种标记注释,所以类FreeText派生自 类Markup,并且还提供了获取/设置自由文本注释属性和 重置自由文本注释外观流的函数。
|
explicit |
构造函数,使用父类对象。
| [in] | annot | 父类对象。 |
| void foxit::pdf::annots::FreeText::AllowTextOverflow | ( | bool | is_text_overflow | ) |
决定是否允许自由文本的文本溢出。
对于标注对象和文本框对象,如果未调用此函数,默认情况下标注或文本框的文本允许溢出。 对于打字机对象,如果未调用此函数,默认情况下打字机的文本不允许溢出。
| [in] | is_text_overflow | 决定当自由文本矩形的大小小于文本内容大小时, 是否允许文本内容溢出的布尔值:
|
| common::Alignment foxit::pdf::annots::FreeText::GetAlignment | ( | ) | const |
获取对齐值。
此属性对自由文本注释的外观有影响。
| EndingStyle foxit::pdf::annots::FreeText::GetCalloutLineEndingStyle | ( | ) | const |
获取标注线起点的线条结束样式。
只有当自由文本注释的意图名称为"FreeTextCallout"时, 此自由文本注释才能具有线条结束样式属性,且此属性对这种 自由文本注释的外观有影响。
| PointFArray foxit::pdf::annots::FreeText::GetCalloutLinePoints | ( | ) | const |
获取标注线点。
只有当自由文本注释的意图名称为"FreeTextCallout"时,此自由文本注释才能 具有标注线点属性,且此属性对这种自由文本注释的外观有影响。对于标注线, 它可以包含2个或3个点:
| DefaultAppearance foxit::pdf::annots::FreeText::GetDefaultAppearance | ( | ) |
获取默认外观数据。
此属性对自由文本注释的外观有影响。默认外观数据可用于 格式化文本。
| RGB foxit::pdf::annots::FreeText::GetFillColor | ( | ) | const |
获取填充颜色。
此属性对自由文本注释的外观有影响。填充颜色用于填充 文本框的背景,也用于某些标注线结束样式:
"Square"、"Circle"、"Diamond"、"ClosedArrow"、"RClosedArrow"。
| RectF foxit::pdf::annots::FreeText::GetInnerRect | ( | ) | const |
获取内部矩形。
此属性对自由文本注释的外观有影响。对于自由文本注释, 内部矩形是应该显示注释文本的位置。内部矩形可能与注释矩形相同 或小于注释矩形,但绝不应大于注释矩形。
| common::Rotation foxit::pdf::annots::FreeText::GetRotation | ( | ) |
获取当前旋转值(顺时针)。
| Matrix foxit::pdf::annots::FreeText::GetTextMatrix | ( | ) | const |
获取当前自由文本注释中文本的默认外观数据中的矩阵。
此属性对自由文本注释的外观有影响。此属性可用于 改变文本显示的倾斜度。
| void foxit::pdf::annots::FreeText::Rotate | ( | common::Rotation | rotation | ) |
从当前状态按指定旋转值(顺时针)旋转当前注释。
| [in] | rotation | 表示用于从当前状态顺时针旋转当前注释的度数的旋转值。 请参考从common::e_Rotation0开始的值, 这应该是这些值中的一个,除了common::e_RotationUnknown。 特别地,如果输入值是common::e_Rotation0 (意味着不旋转当前注释),当前函数将不执行任何操作。 |
| void foxit::pdf::annots::FreeText::SetAlignment | ( | common::Alignment | alignment | ) |
设置对齐值
此属性对自由文本注释的外观有影响。如果用户希望新的对齐方式对注释外观 产生效果,请在设置新对齐方式后调用函数Annot::ResetAppearanceStream。
| [in] | alignment | 新的对齐值。请参考从common::e_AlignmentLeft开始的值, 这应该是这些值中的一个。 如果使用其他值进行设置,默认将使用common::e_AlignmentLeft。 |
| void foxit::pdf::annots::FreeText::SetCalloutLineEndingStyle | ( | EndingStyle | ending_style | ) |
设置标注线起点的线条结束样式。
只有当自由文本注释的意图名称为"FreeTextCallout"时, 此自由文本注释才能具有线条结束样式属性,且此属性对这种 自由文本注释的外观有影响。
如果用户希望新的线条结束样式对注释外观产生效果,请在设置新线条结束样式后 调用函数Annot::ResetAppearanceStream。
| [in] | ending_style | 要设置的起点线条结束样式。请参考从 Markup::e_EndingStyleNone开始的值, 这应该是这些值中的一个。 |
| void foxit::pdf::annots::FreeText::SetCalloutLinePoints | ( | const PointFArray & | point_array | ) |
设置标注线的点。
只有当自由文本注释的意图名称为"FreeTextCallout"时,此自由文本注释才能 具有标注线点属性,且此属性对这种自由文本注释的外观有影响。对于标注线, 它可以包含2个或3个点:
如果用户希望新的标注线点对注释外观产生效果,请在设置新标注线点后 调用函数Annot::ResetAppearanceStream。
| [in] | point_array | 指定标注线起点、拐点(如果有)和终点的新点数组。 元素数量应为2或3: 2个点表示起点和终点;3个点表示起点、拐点和终点。 如果元素数量超过3,只有前3个点将被用于设置标注线。 |
| bool foxit::pdf::annots::FreeText::SetDefaultAppearance | ( | const DefaultAppearance & | default_ap | ) |
设置默认外观数据。
此属性对自由文本注释的外观有影响。默认外观数据可用于 格式化文本。
如果用户希望新的默认外观数据对注释外观产生效果, 请在设置新默认外观数据后调用函数Annot::ResetAppearanceStream。
| [in] | default_ap | 要设置的新默认外观数据。 输入数据的flags可用于决定哪些信息将用新数据更新; 对于那些不更新的数据,它们将继续使用旧数据。 |
| void foxit::pdf::annots::FreeText::SetFillColor | ( | RGB | fill_color | ) |
设置填充颜色。
此属性对自由文本注释的外观有影响。填充颜色用于填充文本框的背景, 也用于某些标注线结束样式:
"Square"、"Circle"、"Diamond"、"ClosedArrow"、"RClosedArrow"。
如果用户希望新的填充颜色对注释外观产生效果,请在设置新填充颜色后 调用函数Annot::ResetAppearanceStream。
| [in] | fill_color | 要设置的新填充颜色。格式:0xRRGGBB。 |
| void foxit::pdf::annots::FreeText::SetInnerRect | ( | const RectF & | inner_rect | ) |
设置内部矩形。
此属性对自由文本注释的外观有影响。对于自由文本注释, 内部矩形是应该显示注释文本的位置。内部矩形可能与注释矩形相同 或小于注释矩形,但绝不应大于注释矩形。
如果用户希望新的内部矩形对注释外观产生效果,请在设置新内部矩形后 调用函数Annot::ResetAppearanceStream。
| [in] | inner_rect | 要设置的新内部矩形。它应该与注释矩形相同或小于注释矩形。 |
| void foxit::pdf::annots::FreeText::SetRotation | ( | common::Rotation | rotation | ) |
设置旋转值(顺时针)。
此属性对自由文本注释的外观有影响。如果用户希望新的旋转 对注释外观产生效果,请在设置新旋转后调用函数 Annot::ResetAppearanceStream。
| [in] | rotation | 要设置给当前自由文本注释的新旋转值(顺时针)。 请参考从common::e_Rotation0开始的值, 这应该是这些值中的一个,除了common::e_RotationUnknown。 |
| void foxit::pdf::annots::FreeText::SetTextMatrix | ( | const Matrix & | text_matrix | ) |
为当前自由文本注释中的文本设置默认外观数据中的矩阵。
此属性对自由文本注释的外观有影响。此属性可用于 改变文本显示的倾斜度。
如果用户希望新的文本矩阵对注释外观产生效果,请在设置新文本矩阵后 调用函数Annot::ResetAppearanceStream。
| [in] | text_matrix | 新的文本矩阵。 |