AddAutoShape

AddAutoShape(ShapeType, float, float, float, float)

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

public IAutoShape AddAutoShape(ShapeType shapeType, float x, float y, float width, float height)
ParameterTypeDescription
shapeTypeShapeTypeThe ShapeType of the auto shape to add.
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


AddAutoShape(ShapeType, float, float, float, float, bool)

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

public IAutoShape AddAutoShape(ShapeType shapeType, float x, float y, float width, float height, 
    bool createFromTemplate)
ParameterTypeDescription
shapeTypeShapeTypeThe ShapeType of the auto shape to add.
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 (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