InsertAutoShape

InsertAutoShape(int, ShapeType, float, float, float, float)

Creates a new auto shape and inserts it into the shape collection at the specified index, applying default template formatting.

public IAutoShape InsertAutoShape(int index, ShapeType shapeType, float x, float y, float width, 
    float height)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the new auto shape.
shapeTypeShapeTypeThe ShapeType of the auto shape to insert.
xSingleThe x-coordinate of the shape’s frame, in points.
ySingleThe y-coordinate of the shape’s frame, in points.
widthSingleThe width of the shape’s frame, in points.
heightSingleThe height of the shape’s frame, in points.

Return Value

The newly created IAutoShape.

See Also


InsertAutoShape(int, ShapeType, float, float, float, float, bool)

Creates a new auto shape and inserts it into the shape collection at the specified index, optionally initializing it with default template styling.

public IAutoShape InsertAutoShape(int index, ShapeType shapeType, float x, float y, float width, 
    float height, bool createFromTemplate)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the auto shape.
shapeTypeShapeTypeThe ShapeType of the auto shape to insert.
xSingleThe x-coordinate of the shape’s frame, in points.
ySingleThe y-coordinate of the shape’s frame, in points.
widthSingleThe width of the shape’s frame, in points.
heightSingleThe height of the shape’s frame, in points.
createFromTemplateBooleanTrue to apply default template styling (including a non-empty name, simple style, and centered text); false to create the shape with all properties set to their defaults.

Return Value

The newly created IAutoShape.

See Also