ShapeCollection — Aspose.Slides FOSS C++ API Reference
ShapeCollection — Manages the collection of shapes on a slide.
Package: Aspose::Slides
Properties
| Property | Type | Access | Description |
|---|---|---|---|
ShapeCollection | ShapeCollection | Read | |
Table | Table | Read |
Methods
| Method | Returns | Description |
|---|---|---|
ShapeCollection() | ShapeCollection | |
Table() | Table | |
Table() | Table | |
init_internal() | void | Initialize from a slide part, entering XML-backed mode. |
size() | std::size_t | Returns the number of shapes. |
to_array() | std::vector<Shape*> | Returns all shapes as non-owning pointers. |
to_array() | std::vector<Shape*> | Returns all shapes as non-owning pointers. |
reorder() | void | Moves a shape to the specified position (z-order). |
reorder() | void | Moves a shape to the specified position (z-order). |
index_of() | std::ptrdiff_t | Returns the zero-based index of a shape, or -1 if not found. |
remove() | void | Removes a shape from the collection by reference. |
remove_at() | void | Removes the shape at the given index. |
clear() | void | Removes all shapes. |
begin() | iterator | |
end() | iterator | |
begin() | const_iterator | |
end() | const_iterator | |
get_sp_tree() | pugi::xml_node | Get the spTree element from the slide XML. |
load_shapes() | void | Load all shapes from the XML, populating the internal cache. |
invalidate_cache() | void | Invalidate the shapes cache, forcing a reload on next access. |
save_to_part() | void | Save changes to the slide part. |
next_shape_id() | int | Find the next available shape ID in the spTree. |
build_auto_shape_xml() | void | Build XML content for a new AutoShape element. |
build_connector_xml() | void | Build XML content for a new connector (cxnSp) element. |
reorder_single() | void | Reorder a single shape to a new position in XML and cache. |