[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.ShapeCollection

Class ShapeCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a collection of Shape objects.

public class ShapeCollection : ContentObjectCollection<Shape>, IContentList<Shape>, IReadOnlyList<Shape>, IReadOnlyCollection<Shape>, IEnumerable<Shape>, IEnumerable
Inheritance
object
ShapeCollection
Implements
System.Collections.Generic.IReadOnlyList<T><Shape>
System.Collections.Generic.IReadOnlyCollection<T><Shape>
System.Collections.Generic.IEnumerable<T><Shape>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Methods

Add()

Inserts a new 100 x 100 points Rectangle Shape into this collection at the End location.

public Shape Add()

Returns

Shape

The added Shape.

Add(float, float, GeometryType)

Inserts a new Shape with a specified size into this collection at the End location.

public Shape Add(float width, float height, GeometryType type)

Parameters

width float

The shape width.

height float

The shape height.

type GeometryType

The geometry type of the shape.

Returns

Shape

The added Shape.

Add(float, float, string, GeometryType)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If 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 GeometryType

The geometry type of the shape.

Returns

Shape

The added Shape.

Add(float, float, string)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If not null, a TextFrame with this text is added to the shape.

Returns

Shape

The added Shape.

Insert(InsertLocation)

Inserts a new 100 x 100 points Rectangle Shape into this collection at a specified location.

public Shape Insert(InsertLocation location)

Parameters

location InsertLocation

The target InsertLocation for the insertion.

Returns

Shape

The inserted Shape.

Insert(float, float, GeometryType, InsertLocation)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

type GeometryType

The geometry type of the shape.

location InsertLocation

The target InsertLocation for the insertion.

Returns

Shape

The inserted Shape.

Insert(float, float, InsertLocation)

Inserts a new Rectangle Shape with a specified size into this collection at a specified location.

public Shape Insert(float width, float height, InsertLocation location)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

location InsertLocation

The target InsertLocation for the insertion.

Returns

Shape

The inserted Shape.

Insert(float, float, string, GeometryType, InsertLocation)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If 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 GeometryType

The geometry type of the shape.

location InsertLocation

The target InsertLocation for the insertion.

Returns

Shape

The inserted Shape.

Insert(float, float, string, InsertLocation)

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)

Parameters

width float

The shape width, in points.

height float

The shape height, in points.

text string

If not null, a TextFrame with this text is added to the shape.

location InsertLocation

The target InsertLocation for the insertion.

Returns

Shape

The inserted Shape.