Search
Shape Constructor (ElementTemplate[], FillRule)
See Also
 





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

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public Shape (
    ElementTemplate[] elements,
    FillRule fillRule
)

Visual Basic  Copy Code

Public New ( _
    elements() As ElementTemplate, _
    fillRule As FillRule _
)

 Parameters

elements

An array of shape template elements that define the outline of a shape. Can contain lines, arcs and Bézier curves.

fillRule

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) },
    FillRule.EvenOdd);
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) }, _
    FillRule.EvenOdd)

 See Also