Free Form Links

I am trying to create and arrow to point to various parts of my diagram, as someone is working with it. I thought I could use Links to do this, but I am finding that links want to do some weird things, and I don’t see a way to use a link to “point” to a link (like I am doing with nodes).

Below is a picture of a link “arrow” pointing to a node. I need to be able to do a similar thing with links. Or to be able to have just a free form link or arrow to do the same.

Any ideas?

BTW, any ideas on how to get the arrow completely green and not the black tip?

GoLinks are GoStrokes that require a GoPort on each end. You could use the Simpler GoStroke class to get what you want without what I think you see as the “weird things”.

The arrowhead is filled with the Brush fill. You need to set the brush color too.

How would you do the positioning? By just setting the bounds?

something like this…

GoStroke s3 = new GoStroke();
s3.AddPoint(200, 70);
s3.AddPoint(400, 70);
s3.ToArrow = true;

strokes are made up of Points. set the 2 end points and add an arrow head (and set the color and pen width too).
If you run Demo1, you'll see another arrow/pointer object that is yellow-green on the right hand side of the display. That's an Demo1.BlockArrow object, defined in BlockArrow.cs. It's derived from GoPolygon.

actually, try this:

GoStroke s3 = new GoStroke();
s3.AddPoint(210, 70);
s3.AddPoint(400, 50);
s3.ToArrow = true;
Pen p = new Pen(Color.Red, 10);
s3.Pen = p;
s3.ToArrowLength = 20;
s3.ToArrowShaftLength = 20;
s3.ToArrowWidth = 20;
s3.BrushColor = Color.Red;

So what do the points represent in the stroke? Top/Left? Bottom/Right? How does that affect PenWidth?

The two points are End Points of the stroke. No relationship to pen width.