ShapeCollection
ภาพรวม
ShapeCollection เป็นคลาสใน Aspose.Slides FOSS สําหรับ C++.
จัดการเก็บรูปแบบบนสไลด์ ทํางานใน 2 รูปแบบ: - รูปแบบง่ายๆ ( default): รูปแบบถูกจัดการในความจําเท่านั้น. - โหมดที่รองรับ XML (หลังจาก init_internal): รูปแบบถูกอัตราบรรจุจากและคงที่ไปยัง spTree XML ของสไลด์ โดยใช้การเก็บความลับอย่างเบื่อ.
หมวดนี้ให้ 49 วิธีในการทํางานกับวัตถุ ShapeCollection ในโปรแกรม C++. วิธีการที่ใช้ได้แก่: ShapeCollection, Table, add_auto_shape, add_auto_shape_impl, add_connector, add_connector_impl, add_picture_frame, add_picture_frame_impl, add_table, add_table_impl, as_i_collection, as_i_enumerable,และ 25 วิธีเพิ่มเติม. สมาชิกสาธารณะทุกคนสามารถเข้าถึงการใช้งาน C++ ใดก็ได้หลังจากติดตั้งแพ็คเกจ Aspose.Slides FOSS for C++. คุณสมบัติ: ShapeCollection, Table.
คุณสมบัติ
| ชื่อ | ประเภท | Access | คําอธิบาย |
|---|---|---|---|
ShapeCollection | ShapeCollection | อ่าน | รับคอลเลกชันของรูปร่าง. |
Table | Table | อ่าน | รับตาราง. |
วิธีการ
| Signature | คําอธิบาย |
|---|---|
ShapeCollection() → ShapeCollection | ที่ดินให้การเข้าถึงสะสมของตัวเอง |
Table() → Table | เอกสารที่ให้การเข้าถึงรูปตารางที่เกี่ยวข้องกับคอลเลกชั่น |
Table() → Table | |
ShapeCollection() | |
ShapeCollection() | |
init_internal(slide_part: Internal::pptx::SlidePart, parent_slide: IBaseSlide) | เริ่มต้นจากส่วนของสไลด์ เข้าสู่โหมดที่รองรับ XML. |
parent_group() → IGroupShape | กลับรูปแบบกลุ่มแม่ หรือ nullptr หากเป็นระดับบน. |
as_i_collection() → IShapeCollection | ส่งผลการรวบรวมนี้เป็นอินเตอร์เฟสของกลุ่มทั่วไป. |
as_i_enumerable() → IShapeCollection | กลับคอลเลกชั่นนี้เป็นอินเตอร์เฟสที่สามารถนับได้ทั่วไป. |
size() → std::size_t | กลับจํานวนรูปแบบ. |
to_array() → std::vector<Shape*> | ส่งผลให้รูปทั้งหมดเป็นตัวชี้ที่ไม่มีเจ้าของ. |
to_array(start_index: std::size_t, count: std::size_t) → std::vector<Shape*> | ส่งผลให้รูปทั้งหมดเป็นตัวชี้ที่ไม่มีเจ้าของ. |
reorder(new_index: std::size_t, shape: Shape) | ย้ายรูปร่างไปยังตําแหน่งที่กําหนด (z-order). |
reorder(index: std::size_t, shapes: std::span<Shape*>) | ย้ายรูปร่างไปยังตําแหน่งที่กําหนด (z-order). |
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double) → AutoShape | เพิ่ม AutoShape ไปยังคอลเลกชั่น. |
add_auto_shape(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → AutoShape | เพิ่ม AutoShape ไปยังคอลเลกชั่น. |
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double) → AutoShape | การใส่ AutoShape ที่อัตราการแสดงที่ระบุ. |
insert_auto_shape(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → AutoShape | การใส่ AutoShape ที่อัตราการแสดงที่ระบุ. |
add_connector(type: ShapeType, x: double, y: double, width: double, height: double) → Connector | เพิ่มตัวต่อเนื่องเข้ากับการรวบรวม. |
add_connector(type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → Connector | เพิ่มตัวต่อเนื่องเข้ากับการรวบรวม. |
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double) → Connector | วาง Connector ในอัตราที่กําหนดไว้. |
insert_connector(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, create_from_template: bool) → Connector | วาง Connector ในอัตราที่กําหนดไว้. |
index_of(shape: Shape) → std::ptrdiff_t | ส่งผลที่นิทรรศนะฐานศูนย์ของรูปทรง หรือ -1 หากไม่พบ. |
add_picture_frame(type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage) → PictureFrame | เพิ่ม PictureFrame ไปยังคอลเลกชั่น. |
insert_picture_frame(index: std::size_t, type: ShapeType, x: double, y: double, width: double, height: double, image: PPImage) → PictureFrame | การใส่ PictureFrame ที่อัตราการแสดงที่ระบุ. |
add_table(x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Table | เพิ่มตารางเข้ากับการรวบรวม. |
insert_table(index: std::size_t, x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Table | การใส่ตารางที่อัตรานิยมที่ระบุ. |
remove(shape: Shape) | ลบรูปร่างจากคอลเลกชั่นโดยการอ้างอิง. |
remove_at(index: std::size_t) | ลบรูปร่างที่อัตรานิยมที่ให้ไว้. |
clear() | ยกเลิกรูปแบบทั้งหมด. |
table_count() → std::size_t | คืนจํานวนตารางในคอลเลกชั่น. |
table_at(index: std::size_t) → Table | กลับตารางที่อัตรานิยมที่ให้. |
table_at(index: std::size_t) → Table | กลับตารางที่อัตรานิยมที่ให้. |
begin() → iterator | การคืนตัวอิเทเรเตอร์เป็นรูปแบบแรก |
end() → iterator | การคืนการคัดสรรหลังรูปแบบสุดท้าย |
begin() → const_iterator | |
end() → const_iterator | |
get_sp_tree() → pugi::xml_node | ดึงองค์ประกอบ spTree จากสไลด์ XML. |
load_shapes() | อัตราการอัดรูปทั้งหมดจาก XML โดยใช้ cache ภายใน ไม่ต้องเลือกถ้า cache นั้นมีค่าแล้ว. |
invalidate_cache() | ทําให้การเก็บข้อมูลของรูปแบบไม่สมควร และบังคับการชาร์ทใหม่ในครั้งต่อไป. |
save_to_part() | เก็บการเปลี่ยนแปลงในส่วนของสไลด์. |
next_shape_id() → int | ค้นหาตัวรับรองรูปแบบที่มีอยู่ต่อไปใน spTree. |
build_auto_shape_xml(sp: pugi::xml_node, shape_id: int, name: std::string_view, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) | สร้างเนื้อหา XML สําหรับองค์ประกอบใหม่ AutoShape. |
build_connector_xml(cxn_sp: pugi::xml_node, shape_id: int, name: std::string_view, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) | สร้างเนื้อหา XML สําหรับตัวเชื่อมใหม่ (cxnSp). |
add_auto_shape_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) → AutoShape | การดําเนินงานหลักสําหรับ add_auto_shape และ insert_ auto_ shape. |
add_connector_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, create_from_template: bool) → Connector | การดําเนินงานหลักสําหรับ add_connector และ insert_ connector. |
add_picture_frame_impl(index: std::optional<std::size_t>, type: ShapeType, x: double, y: double, w: double, h: double, image: PPImage) → PictureFrame | การดําเนินงานหลักสําหรับ add_picture_frame และ insert_image_frames. |
add_table_impl(index: std::optional<std::size_t>, x: double, y: double, column_widths: std::span<const double>, row_heights: std::span<const double>) → Table | การดําเนินงานหลักสําหรับ add_table และ insert_ table. |
reorder_single(new_index: std::size_t, shape: Shape) | เรียงรูปแบบเดียวเป็นตําแหน่งใหม่ใน XML และ cache. |