NShape Reference
ShapeCollection Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape >

NShape Reference
ShapeCollection Class

Previous pageReturn to chapter overviewNext page

Manages a collection of shapes sorted by z order.

Syntax

public class ShapeCollection : IShapeCollectionIReadOnlyShapeCollection, ICollection

Description

ShapeCollection stores a list of shapes sorted by their z orders. The ShapeCollection class provides support for:

Maintaining the bounding rectangle of all its shapes
Methods for finding shapes
Spatial index for large collections

Public Properties

Name

Description

Bottom

The bottom shape of the collection

BottomUp

Returns all shapes sorted by z-order from the bottom shape to the topmost shape.

Count

Returns the number of shapes in the collection.

IsReadOnly

Indicates whether the collection is read only.

IsSynchronized

Indicates whether access to the collection is synchronized (thread safe).

MaxZOrder

Returns the highest z-order value in the collection.

MinZOrder

Returns the lowest z-order value in the collection.

SyncRoot

Returns an object that can be used to synchronize access to the collection.

TopDown

Returns all shapes sorted by z-order from the topmost shape to the bottom shape.

TopMost

Returns the topmost shape of the collection.

Public Methods

Name

Description

Add

Adds the given shape to the collection.

AddRange

Adds the given shapes to the collection.

Clear

Removes all shapes from the collection.

Clone

Creates an exact copy of the collection and its shapes with or without model objects.

Constructor

Constructs a new instance.

Contains

Tests wether the given shape is part of the collection.

ContainsAll

Tests wether all given shapes are part of the collection.

ContainsAny

Tests wether any of the given shapes is part of the collection.

CopyTo

Copies the collection's shapes to the given array.

FindShape

Returns the first shape (from top to bottom) matching the given constraints.

FindShapes

Finds all shapes matching the given constraints. Found shapes can be returned multiple times.

GetBoundingRectangle

Gets a tight or loose bounding rectangle around all of the collection's shapes. Tight bounding rectangle is a bounding rectangle around the shape's outlines, loose bounding rectangles also include the control points of the shapes.

GetEnumerator

Returns an enumerator that iterates through a collection.

NotifyChildMoved

Notify the collection that one of the child shapes has moved.

NotifyChildMoving

Notify the collection that one of the child shapes is going to move.

NotifyChildResized

Notify the collection that one of the child shapes has resized.

NotifyChildResizing

Notify the collection that one of the child shapes is going to resize.

NotifyChildRotated

Notify the collection that one of the child shapes has rotated.

NotifyChildRotating

Notify the collection that one of the child shapes is going to rotate.

Remove

Removes the given shape from the collection.

RemoveRange

Removes all the given shapes from the collection.

Replace

Replaces the given shape with another shape.

ReplaceRange

Replaces the given shapes with other shapes.

SetZOrder

Sets the z-order of the given shape to the given value.

Protected Properties and Fields

Name

Description

boundingRectangleLoose

A loose fitting bounding rectangle around the shape's outlines including the control points of the shapes.

boundingRectangleTight

A tight fitting bounding rectangle around the shape's outlines.

shapes

The inner list of shapes.

Protected Methods

Name

Description

AddRangeCore

Base implementation of adding a range of shapes to the collection.

ClearCore

Base implementation of removing all shapes from the collection.

InsertCore

Base implementation of inserting a single shape into the collection.

RemoveCore

Base implementation of removing a single shape from the collection.

RemoveRangeCore

Base implementation of removing a range of shapes from the collection.

ReplaceCore

Base implementation of replacing a single shape with another shape.

ReplaceRangeCore

Base implementation of replacing a range of shapes with other shapes.

Derived Classes

Derived classes are:

ShapeAggregation

Requirements

Namespace: Dataweb.NShape

Assembly: Dataweb.NShape