Create own shapes?


Can I create my own shapes and define where the links have to connect?

Sure, use a GoPolygon, or a GoStroke for open shapes.
You can also define your own shape classes–take a look at the various classes inheriting from GoShape in Demo1 and some of the other sample applications.
You might want to combine various shapes using a GoGroup, or even nested GoGroups.
If you want there to be links connecting to your objects, you’ll want to use GoPort(s). Instead of using GoGroup, inherit from GoNode, and add the GoPorts that you need. Override LayoutChildren to make sure they have the size and position that you want them to have relative to the other shapes in the node.
All of the predefined node classes, including all of the example node classes in the sample applications, are defined this way. I strongly suggest you read the chapter in the User Guide about defining your own nodes. You might save yourself some time by examining the appearance and behavior of all of the node classes we provide, so that you can choose the one closest to what you need as your starting point.