AddAutoShape()

ShapeCollection::AddAutoShape(ShapeType, float, float, float, float) method

Creates a new auto shape with default formatting and adds it to the end of the shape collection.

System::SharedPtr<IAutoShape> Aspose::Slides::ShapeCollection::AddAutoShape(ShapeType shapeType, float x, float y, float width, float height) override

Arguments

ParameterTypeDescription
shapeTypeShapeTypeThe ShapeType of the auto shape to add.
xfloatThe x-coordinate of the shape\u2019s frame, in points.
yfloatThe y-coordinate of the shape\u2019s frame, in points.
widthfloatThe width of the shape\u2019s frame, in points.
heightfloatThe height of the shape\u2019s frame, in points.

Return Value

The newly created IAutoShape.

ShapeCollection::AddAutoShape(ShapeType, float, float, float, float, bool) method

Creates a new auto shape and adds it to the end of the shape collection, optionally initializing it with default template formatting.

System::SharedPtr<IAutoShape> Aspose::Slides::ShapeCollection::AddAutoShape(ShapeType shapeType, float x, float y, float width, float height, bool createFromTemplate) override

Arguments

ParameterTypeDescription
shapeTypeShapeTypeThe ShapeType of the auto shape to add.
xfloatThe x-coordinate of the shape\u2019s frame, in points.
yfloatThe y-coordinate of the shape\u2019s frame, in points.
widthfloatThe width of the shape\u2019s frame, in points.
heightfloatThe height of the shape\u2019s frame, in points.
createFromTemplateboolTrue to apply default template styling (simple style, centered text, and non-empty name) to the new shape; false to create the shape with all properties set to their default values.

Return Value

The newly created IAutoShape.

See Also