InsertAutoShape()

ShapeCollection::InsertAutoShape(int32_t, ShapeType, float, float, float, float) method

Creates a new AutoShape, tunes it from default template and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.

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

Arguments

ParameterTypeDescription
indexint32_tThe zero-based index at which value should be inserted.
shapeTypeShapeTypeAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.

Return Value

Created AutoShape object.

ShapeCollection::InsertAutoShape(int32_t, ShapeType, float, float, float, float, bool) method

Creates a new AutoShape and inserts it to the collection at the specified index. Note: the type of the shape will be determined by the shapeType parameter.

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

Arguments

ParameterTypeDescription
indexint32_tThe zero-based index at which value should be inserted.
shapeTypeShapeTypeAn ShapeType of shape.
xfloatThe X-coordinate for a left side of shape’s frame.
yfloatThe Y-coordinate for a top side of shape’s frame.
widthfloatThe width of shape’s frame.
heightfloatThe height of shape’s frame.
createFromTemplateboolIf true then new shape will be tuned from default template. Not empty name, simple style, text centered will be assined to the new shape. If false then all values of the properties of the new shape will have default values.

Return Value

Created AutoShape object.

See Also