Portion — Aspose.Slides FOSS for C++ API Reference
Properties Portion class แสดงถึงช่วงของข้อความที่มีการจัดรูปแบบระดับอักขระแบบสม่ำเสมอภายใน a Paragraph.
Properties: Aspose::Slides::Foss
#include <Aspose/Slides/Foss/portion.h>class PortionProperties: include/Aspose/Slides/Foss/portion.h
Properties
| Properties | Properties |
|---|---|
Portion() | สร้างส่วนใหม่ที่ว่างเปล่า. |
Properties
| Properties | Properties | Properties |
|---|---|---|
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;
// }