IShapeCollection
Overview
IShapeCollection is a class in Aspose.Slides FOSS for Python.
Inherits from: ABC.
Represents a collection of shapes.
This class declares 24 methods for IShapeCollection objects in Python programs.
Available methods include: __getitem__, add_auto_shape, add_connector, add_group_shape, add_picture_frame, add_table, clear, index_of, insert_auto_shape, insert_connector, insert_picture_frame, insert_table, and 4 additional methods.
Public members are accessible to any Python application after installing the Aspose.Slides FOSS for Python package.
Properties: as_i_collection, as_i_enumerable, parent_group.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
parent_group | IGroupShape | Read | Gets the parent group shape object for the shapes collection. |
as_i_collection | list | Read | Gets the as i collection. |
as_i_enumerable | Any | Read | Gets the as i enumerable. |
Methods
| Signature | Description |
|---|---|
to_array() → list[IShape] | Returns the shapes in the collection as a list, optionally limited by start index and count |
to_array(start_index, count) → list[IShape] | Calls to_array(start_index, count) on this IShapeCollection instance. |
reorder(index, shape) | Moves a list of shapes to start at the specified index in the collection |
reorder(index, shapes) | Calls reorder(index, shapes) on this IShapeCollection instance. |
add_auto_shape(shape_type, x, y, width, height) → IAutoShape | Creates and adds an AutoShape of the given type and dimensions, returning it |
add_auto_shape(shape_type, x, y, width, height, create_from_template) → IAutoShape | Calls add_auto_shape(shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance. |
insert_auto_shape(index, shape_type, x, y, width, height) → IAutoShape | Inserts a new AutoShape at the specified index with given type and dimensions |
insert_auto_shape(index, shape_type, x, y, width, height, create_from_template) → IAutoShape | Calls insert_auto_shape(index, shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance. |
add_connector(shape_type, x, y, width, height) → IConnector | Creates and adds a Connector shape of the given type and dimensions, returning it |
add_connector(shape_type, x, y, width, height, create_from_template) → IConnector | Calls add_connector(shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance. |
insert_connector(index, shape_type, x, y, width, height) → IConnector | Calls insert_connector(index, shape_type, x, y, width, height) on this IShapeCollection instance. |
insert_connector(index, shape_type, x, y, width, height, create_from_template) → IConnector | Calls insert_connector(index, shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance. |
add_group_shape() → IGroupShape | Creates a GroupShape from an SVG image placed at the given position and size |
add_group_shape(svg_image, x, y, width, height) → IGroupShape | Calls add_group_shape(svg_image, x, y, width, height) on this IShapeCollection instance. |
add_group_shape() → IGroupShape | |
index_of(shape) → int | Calls index_of(shape) on this IShapeCollection instance. |
add_picture_frame(shape_type, x, y, width, height, image) → IPictureFrame | Adds a PictureFrame of the given type, position, size and image, returning it |
insert_picture_frame(index, shape_type, x, y, width, height, image) → IPictureFrame | Inserts a PictureFrame at the specified index with given parameters |
add_table(x, y, column_widths, row_heights) → ITable | Adds a Table at the given position with specified column widths and row heights |
insert_table(index, x, y, column_widths, row_heights) → ITable | Inserts a Table at the given index with defined column widths and row heights |
remove_at(index) | Deletes the shape located at the specified index from the collection |
remove(shape) | Deletes the specified shape from the collection |
clear() | Removes all shapes from the collection |
__getitem__(index: int) → IShape | Calls getitem(index) on this IShapeCollection instance. |