This isn’t exactly what you’re asking for, but here’s an example that draws a hexagonal arrow-like arrowhead.

[Serializable]

public class TestLink : GoLink {

public TestLink() {

this.ToArrowShaftLength = 6;

this.FromArrowShaftLength = 6;

}

public override int GetArrowheadPointsCount(bool atEnd) {

return 6;

}

public override void CalculateArrowhead(PointF anchor, PointF endPoint, bool atEnd, PointF[] poly) {

// calculate the line length; if it is zero, pretend that it is one

// in order to avoid divide by 0 errors.

float x1 = endPoint.X;

float y1 = endPoint.Y;

float xPart = x1 - anchor.X;

float yPart = y1 - anchor.Y;

float line_length = (float)Math.Sqrt(xPart * xPart + yPart * yPart);

if (line_length < 0.01f) line_length = 0.01f;

// calculate the slope of the line

float cosine = xPart / line_length;

float sine = yPart / line_length;

float length;

float shaftlength;

float width;

if (atEnd) {

length = this.ToArrowLength;

shaftlength = this.ToArrowShaftLength;

width = this.ToArrowWidth;

} else {

length = this.FromArrowLength;

shaftlength = this.FromArrowShaftLength;

width = this.FromArrowWidth;

}

// calculate half the width

width /= 2;

// don’t let the arrowhead be bigger than the last segment of the stroke

float maxlength = Math.Max(length, shaftlength);

if (maxlength > 0 && line_length < maxlength && this.Style != GoStrokeStyle.Bezier) {

float scale = line_length/maxlength;

length *= scale;*

shaftlength *= scale;*

width *= scale;*

}

// determine the unrotated head’s points

// 1-------2

// \ <BR> // ----------0-------3 <==origin

// / /

// 5-------4

float initx0 = -shaftlength;

float inity0 = 0;

float initx1 = -length;

float inity1 = -width;

float initx2 = -length+shaftlength;

float inity2 = -width;

//float initx3 = 0;

//float inity3 = 0;

float initx4 = -length+shaftlength;

float inity4 = width;

float initx5 = -length;

float inity5 = width;

// rotate and translate the unrotated arrowhead

poly[0].X = x1 + (cosineinitx0 - sineinity0);

poly[0].Y = y1 + (sineinitx0 + cosine*inity0);*

poly[1].X = x1 + (cosineinitx1 - sine*inity1);*

poly[1].Y = y1 + (sineinitx1 + cosine*inity1);*

poly[2].X = x1 + (cosineinitx2 - sine*inity2);*

poly[2].Y = y1 + (sineinitx2 + cosine*inity2);*

poly[3].X = x1;

poly[3].Y = y1;

poly[4].X = x1 + (cosineinitx4 - sine*inity4);*

poly[4].Y = y1 + (sineinitx4 + cosine*inity4);*

poly[5].X = x1 + (cosineinitx5 - sine*inity5);*

poly[5].Y = y1 + (sineinitx5 + cosine*inity5);

}

}