IShapeCollection

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

NameTypeAccessDescription
parent_groupIGroupShapeReadGets the parent group shape object for the shapes collection.
as_i_collectionlistReadGets the as i collection.
as_i_enumerableAnyReadGets the as i enumerable.

Methods

SignatureDescription
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) → IAutoShapeCreates and adds an AutoShape of the given type and dimensions, returning it
add_auto_shape(shape_type, x, y, width, height, create_from_template) → IAutoShapeCalls 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) → IAutoShapeInserts 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) → IAutoShapeCalls 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) → IConnectorCreates and adds a Connector shape of the given type and dimensions, returning it
add_connector(shape_type, x, y, width, height, create_from_template) → IConnectorCalls add_connector(shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance.
insert_connector(index, shape_type, x, y, width, height) → IConnectorCalls 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) → IConnectorCalls insert_connector(index, shape_type, x, y, width, height, create_from_template) on this IShapeCollection instance.
add_group_shape() → IGroupShapeCreates a GroupShape from an SVG image placed at the given position and size
add_group_shape(svg_image, x, y, width, height) → IGroupShapeCalls add_group_shape(svg_image, x, y, width, height) on this IShapeCollection instance.
add_group_shape() → IGroupShape
index_of(shape) → intCalls index_of(shape) on this IShapeCollection instance.
add_picture_frame(shape_type, x, y, width, height, image) → IPictureFrameAdds a PictureFrame of the given type, position, size and image, returning it
insert_picture_frame(index, shape_type, x, y, width, height, image) → IPictureFrameInserts a PictureFrame at the specified index with given parameters
add_table(x, y, column_widths, row_heights) → ITableAdds a Table at the given position with specified column widths and row heights
insert_table(index, x, y, column_widths, row_heights) → ITableInserts 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) → IShapeCalls getitem(index) on this IShapeCollection instance.

See Also

 English