Portion

Portion — Aspose.Slides FOSS for C++ API Reference

Properties Portion class 表示在…内具有统一字符级格式的文本运行 Paragraph.

Properties: Aspose::Slides::Foss

#include <Aspose/Slides/Foss/portion.h>
class Portion

Properties: include/Aspose/Slides/Foss/portion.h


Properties

PropertiesProperties
Portion()创建一个新的空白部分。.

Properties

PropertiesPropertiesProperties
text()Properties返回此部分的文本。.
set_text(const std::string&)Properties设置文本内容。.

IPortionFormat / PortionFormat

字符级格式通过 PortionFormat. 通过…可用的关键属性包括 IBasePortionFormat 接口包括以下访问::

  • FillFormat — 文本填充
  • EffectFormat — 文本效果
  • LineFormat — 文本轮廓
  • ColorFormat — 文本颜色
  • FontData — 字体设置

使用示例

#include <Aspose/Slides/Foss/presentation.h>
using namespace Aspose::Slides::Foss;

Presentation prs("deck.pptx");
// Access first shape's text frame paragraphs and portions
// auto& para = text_frame.paragraphs()[0];
// for (auto& portion : para.portions()) {
//     std::cout << portion.text() << std::endl;
// }

另见

 中文