I implemented the rotating sample for a gonode.
Do the links snap to the ports as soon as you move the node?
No, it snap to the same place before i rotated the node - it look like an invisible port where the link line is.
The ports are the green squares, right? Can you start a new link from them, or are they a green square that doesn’t act like a port after rotating?
The green squares is the selection handles, the ports is the two arrows. if you look at the node on the right top that is the original node with two arrows (ports). if you look at the left bottem port that is the rotated node with the arrows (Ports). the line that stops on the left of the rotated node is the real port, in other words the arrows rotated to indicate where the ports must be after the rotation but the lines still link on the same place as the original node.
sigh. Sometimes I think I should finish my first coffee before answering questions here. I looked at that all wrong the first time.
i am not sure if we miss each other, i got a little test app for you where ccan i mail it to?
OK… your rotation is a RotateTransform in the middle of Paint. That visually rotates things, but Go still thinks all the objects are at the X,Y you started at with a zero-degree rotation. So, the port triangle is drawn in the rotated position, but the GoPort itself is where it always was. (You can start a new link if you mouse-down where the link ends.)
Thanks Jake - i never dived so deep into the graphics engine, can you please help out with a example?
There’s a section on “GoDrawing and Predefined Figures” in the 3.0 User Guide. GoDrawing supports Rotation…
For example, to create a “Rounded I-Beam” shape that looks somewhat like a capital “I” with concave curves:
GoDrawing s = new GoDrawing();
s.CurveTo(50, 25, 50, 75, 100, 100);
s.CurveTo(50, 75, 50, 25, 0, 0);
This will work if i want to create my own shapes, not to rotate existing shapes.