Namespace TallComponents.PDF.Shapes
Class ShapeCollection
Collection of shape objects. Shapes is a shape itself. This allows recursion. A shapes collection can be seen as a canvas. You draw on this canvas by adding shapes to it.
Syntax
public class ShapeCollection : ContentShape,IEnumerable<Shape>
Constructors
ShapeCollection()
Create a new empty collection of shapes.
ShapeCollection(Double,Double)
Create a new empty collection of shapes. Positioned at 0,0.
ShapeCollection(Double,Double,Double,Double)
Create a new empty collection of shapes.
ShapeCollection(Double,Double,Double,Double,Double,Double)
Create a new empty collection of shapes.
ShapeCollection(Double,Double,Transform)
Create a new empty collection of shapes.
Properties
Boolean Clip
Clip child shapes. Default is true.
Int32 Count
Number of shapes in this collection.
Double Height
Height of this shape with respect to parent coordinate system.
Shape Item
Get a shape by index (0-based).
Double VirtualHeight
The height of the virtual canvas on which child shapes are positioned.
This implies a coordinate system transformation.
Double VirtualWidth
The width of the virtual canvas on which child shapes are positioned.
This implies a coordinate system transformation.
Double Width
Width of this shape with respect to parent coordinate system.
Methods
Void Add(Shape)
Add an existing shape to this collection.
Void AddRange(ShapeCollection)
Adds the elements of a ShapeCollection to the end of this collection.
Void AddRange(Shape[])
Adds the elements of a Shape array to the end of this collection.
Void Clear()
Remove all shapes from this collection.
Shape Clone()
Clones a Shape.
Void Compose()
Overide this method to construct custom shapes.
Boolean Contains(Shape)
Determine whether an Shape is in the ShapeCollection.
IEnumerator<Shape> GetEnumerator()
Implements strong typed IEnumerable<T>.GetEnumerator.
Int32 IndexOf(Shape)
Returns the index of the specified shape.
Void Insert(Int32,Shape)
Insert an existing shape at the specified index.
Boolean Remove(Shape)
Remove a shape from this collection.
Void RemoveAt(Int32)
Remove a shape at the specified index.