private static void DrawArrow(Edge e, Pen pen, Graphics graphics, P start, P end) { PointF[] points; float arrowAngle = 30; P dir = end - start; P h = dir; dir /= dir.Length; P s = new P(-dir.Y, dir.X); s *= h.Length * ((float)Math.Tan(arrowAngle * 0.5f * (Math.PI / 180.0))); points = new PointF[] { GleePointToDrawingPoint(start + s), GleePointToDrawingPoint(end), GleePointToDrawingPoint(start - s) }; graphics.FillPolygon(pen.Brush, points); }
private System.Drawing.Point GleePointToDrawingPoint(Microsoft.Glee.Splines.Point point) { return(new System.Drawing.Point((int)point.X, (int)point.Y)); }