[]
Represents a collection of Shape objects.
public class ShapeCollection : ContentObjectCollection<Shape>, IContentList<Shape>, IReadOnlyList<Shape>, IReadOnlyCollection<Shape>, IEnumerable<Shape>, IEnumerable
public Shape Add()
public Shape Add(float width, float height, GeometryType type)
width
floatThe shape width.
height
floatThe shape height.
type
GeometryTypeThe geometry type of the shape.
Inserts a new Shape with a specified size, text and geometry into this collection at the End location.
public Shape Add(float width, float height, string text, GeometryType type)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)).
If this parameter is not null and type
specifies one of those geometries, an exception will be thrown.
type
GeometryTypeThe geometry type of the shape.
Inserts a new Rectangle Shape with a specified size and text into this collection at the End location.
public Shape Add(float width, float height, string text = null)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
public Shape Insert(InsertLocation location)
location
InsertLocationThe target InsertLocation for the insertion.
Inserts a new Shape with a specified size and geometry into this collection at a specified location.
public Shape Insert(float width, float height, GeometryType type, InsertLocation location)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
type
GeometryTypeThe geometry type of the shape.
location
InsertLocationThe target InsertLocation for the insertion.
public Shape Insert(float width, float height, InsertLocation location)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
location
InsertLocationThe target InsertLocation for the insertion.
Inserts a new Shape with a specified size, text and geometry into this collection at a specified location.
public Shape Insert(float width, float height, string text, GeometryType type, InsertLocation location)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
Note that some geometries do not allow text frames (see TextFrameSupported(GeometryType)).
If this parameter is not null and type
specifies one of those geometries, an exception will be thrown.
type
GeometryTypeThe geometry type of the shape.
location
InsertLocationThe target InsertLocation for the insertion.
Inserts a new Rectangle Shape with a specified size and text into this collection at a specified location.
public Shape Insert(float width, float height, string text, InsertLocation location)
width
floatThe shape width, in points.
height
floatThe shape height, in points.
text
stringIf not null, a TextFrame with this text is added to the shape.
location
InsertLocationThe target InsertLocation for the insertion.