Portion

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

Properties Portion class แสดงถึงช่วงของข้อความที่มีการจัดรูปแบบระดับอักขระแบบสม่ำเสมอภายใน a 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;
// }

ดูเพิ่มเติม

 ภาษาไทย