InsertAutoShape

ShapeCollection.InsertAutoShape method (1 of 2)

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.

public IAutoShape InsertAutoShape(int index, ShapeType shapeType, float x, float y, float width, 
    float height)
Parameter Type Description
index Int32 The zero-based index at which value should be inserted.
shapeType ShapeType An ShapeType of shape.
x Single The X-coordinate for a left side of shape’s frame.
y Single The Y-coordinate for a top side of shape’s frame.
width Single The width of shape’s frame.
height Single The height of shape’s frame.

Return Value

Created AutoShape object.

See Also


ShapeCollection.InsertAutoShape method (2 of 2)

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.

public IAutoShape InsertAutoShape(int index, ShapeType shapeType, float x, float y, float width, 
    float height, bool createFromTemplate)
Parameter Type Description
index Int32 The zero-based index at which value should be inserted.
shapeType ShapeType An ShapeType of shape.
x Single The X-coordinate for a left side of shape’s frame.
y Single The Y-coordinate for a top side of shape’s frame.
width Single The width of shape’s frame.
height Single The height of shape’s frame.
createFromTemplate Boolean If 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