ASP.NET Pack Programmer's Guide
Shape Constructor (CreatePathDelegate, String)
See Also
 





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

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public Shape (
    CreatePathDelegate outlineDelegate,
    string id
)

Visual Basic  Copy Code

Public New ( _
    outlineDelegate As CreatePathDelegate, _
    id As String _
)

 Parameters

outlineDelegate
A delegate called to generate GraphicsPath objects representing the shape outline.
id

The string identifier of the new shape.

 Example

This example creates a triangular shape:

C#  Copy Code

Shape shape = new Shape(CreatePath, "my shape");

GraphicsPath CreatePath(RectangleF shapeData)
{
    GraphicsPath path = new GraphicsPath();
    path.AddLine(10, 0, shapeData.Width, 10);
    path.AddLine(shapeData.Width, 10, shapeData.Width / 2, shapeData.Height);
    path.CloseAllFigures();
    return path;
}

 See Also

Shape Constructor Overload List
Shape Class
MindFusion.Diagramming Namespace
ShapeData Class