I’d like to implement a custom GoLink object and wonder how feasible it is and what my best approach would be.
The intention is to create a Link class which behaves a bit like a normal GoLink with the bezier style. Except that this link would have three defining points rather than four. The curve so defined would need to start at one point and form an arc through the second to end at the third.
I have acheived some of this by setting a bezier style and overriding CalculateStroke to include the following snippet:
GoPort from = (FromPort as GoPort);
GoPort to = (ToPort as GoPort);
In actual fact I have some additional type checking and I fail over to the base implementation. But, this snippet captures the gist.
This seems to do the trick for drawing the curve as I intend, but I'm now stumped on how I can allow my user to edit the curve with a single selection handle at the mid point of the curve.
I have tried messing with overrides of AddSelectionHandles and have made some headway. I draw the appropriate handles but have not managed to make them actually affect the curve.
Is this something I should give up on, do I need a completely different approach or am I just missing something?
Any help appreciated.