ASP.NET Pack Programmer's Guide
Shape Constructor (ElementTemplate[], FillMode)
See Also
 





Initializes a new instance of the Shape class with the specified outline.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Shape (
    ElementTemplate[] elements,
    FillMode fillMode
)

Visual Basic  Copy Code

Public New ( _
    elements() As ElementTemplate, _
    fillMode As FillMode _
)

 Parameters

elements
An array of shape template elements that define the outline of a shape. Can contain lines, arcs and Bézier curves.
fillMode
Specifies how areas are filled if the outline path intersects itself.

 Example

C#  Copy Code

diagram.DefaultShape = new Shape(
    new ElementTemplate[] {
        new LineTemplate(0, 100, 35, 0),
        new LineTemplate(35, 0, 100, 0),
        new LineTemplate(100, 0, 65, 100),
        new LineTemplate(65, 100, 0, 100) },
    FillMode.Winding);

Visual Basic  Copy Code

diagram.DefaultShape = new Shape( _
    new ElementTemplate() { _
        new LineTemplate(0, 100, 35, 0), _
        new LineTemplate(35, 0, 100, 0), _
        new LineTemplate(100, 0, 65, 100), _
        new LineTemplate(65, 100, 0, 100) }, _
    FillMode.Winding)

 See Also

Shape Constructor Overload List
Shape Class
MindFusion.Diagramming Namespace