TextFrameFormat
概述
TextFrameFormat 是 Aspose.Slides 为 C++ 提供的 FOSS 中的一个类。
表示文本帧的格式属性。
此类提供 46 个用于在 C++ 程序中处理 TextFrameFormat 对象的方法。可用的方法包括:NullableBool、TextAnchorType、TextAutofitType、TextFrameFormat、TextShapeType、TextVerticalType、ThreeDFormat、anchoring_type、autofit_type、center_text、column_count、column_spacing,以及另外 31 个方法。安装 Aspose.Slides 为 C++ 提供的 FOSS 包后,所有公共成员对任何 C++ 应用程序均可访问。属性有:NullableBool、TextAnchorType、TextAutofitType、TextShapeType、TextVerticalType、ThreeDFormat。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
NullableBool | NullableBool | 读取 | 获取可空布尔值。 |
TextAnchorType | TextAnchorType | 读取 | 获取文本锚点类型。 |
TextVerticalType | TextVerticalType | 读取 | 获取文本的垂直类型。 |
TextAutofitType | TextAutofitType | 读取 | 获取文本自动适配类型。 |
ThreeDFormat | ThreeDFormat | 读取 | 获取三维格式。 |
TextShapeType | TextShapeType | 读取 | 获取文本形状类型。 |
方法
| 签名 | 描述 |
|---|---|
NullableBool() → NullableBool | 返回指示特定文本框设置的可空布尔值 |
TextAnchorType() → TextAnchorType | 属性获取或设置框内文本锚点的对齐方式 |
NullableBool() → NullableBool | |
TextVerticalType() → TextVerticalType | 属性获取或设置垂直文本方向 |
TextAutofitType() → TextAutofitType | 属性获取或设置文本的自动适应行为 |
ThreeDFormat() → ThreeDFormat | 属性提供对文本框的 3D 格式化的访问 |
ThreeDFormat() → ThreeDFormat | |
TextShapeType() → TextShapeType | 属性用于获取或设置文本框的形状类型 |
TextFrameFormat() | |
margin_left() → double | 返回左边距(单位为点)。NaN = undefined. |
set_margin_left(value: double) | 设置左边距(单位为点)。 |
margin_right() → double | 返回右边距(单位为点)。NaN = undefined. |
set_margin_right(value: double) | 以点为单位设置右边距。 |
margin_top() → double | 返回以点为单位的上边距。 NaN = undefined. |
set_margin_top(value: double) | 以点为单位设置顶部边距。 |
margin_bottom() → double | 返回以点为单位的下边距。 NaN = undefined. |
set_margin_bottom(value: double) | 以点为单位设置底部边距。 |
wrap_text() → NullableBool | 返回文本是否换行。 |
set_wrap_text(value: NullableBool) | 设置文本是否换行。 |
anchoring_type() → TextAnchorType | 返回文本锚点类型。 |
set_anchoring_type(value: TextAnchorType) | 设置文本锚点类型。 |
center_text() → NullableBool | 返回文本是否居中。 |
set_center_text(value: NullableBool) | 设置文本是否居中。 |
text_vertical_type() → TextVerticalType | 返回文本的垂直类型。 |
set_text_vertical_type(value: TextVerticalType) | 设置文本的垂直类型。 |
autofit_type() → TextAutofitType | 返回自动适配类型。 |
set_autofit_type(value: TextAutofitType) | 设置自动适配类型。 |
column_count() → int | 返回列的数量。 |
set_column_count(value: int) | 设置列的数量。 |
column_spacing() → double | 返回列间距,以点为单位。 |
set_column_spacing(value: double) | 设置列间距(以点为单位)。 |
three_d_format() → ThreeDFormat | 返回表示文本 3D 效果属性的 ThreeDFormat 对象。只读。 |
three_d_format() → ThreeDFormat | 返回表示文本 3D 效果属性的 ThreeDFormat 对象。只读。 |
keep_text_flat() → bool | 返回文本是否保持平面(无 3D 旋转)。 |
set_keep_text_flat(value: bool) | 设置文本是否保持平面(无 3D 旋转)。 |
rotation_angle() → double | 返回旋转角度(以度为单位)。 |
set_rotation_angle(value: double) | 设置旋转角度(单位为度)。 |
transform() → TextShapeType | 返回文本形状类型(transform)。 |
set_transform(value: TextShapeType) | 设置文本形状类型(变换)。 |
init_internal(txbody_element: pugi::xml_node, save_callback: std::function<void()>) | 从现有的 XML 节点进行初始化。 |
get_body_pr() → pugi::xml_node | 查找 txBody 元素的 子节点。 |
ensure_body_pr() → pugi::xml_node | 查找或创建 txBody 元素的 子节点。 |
save() | 通过 save 回调持久化更改。 |
get_margin(attr: std::string_view, default_emu: int) → double | 从 bodyPr 读取边距属性并将 EMU 转换为 points。 |
set_margin(attr: std::string_view, value: double) | 将以 points 为单位的边距值写入 bodyPr,作为 EMU 属性。 |
resize_shape_to_fit_text(body_pr: pugi::xml_node) | 调整父形状大小以适应文本内容,保持垂直居中。 |