/ Published in: C#
Expand |
Embed | Plain Text
//Example Usage LinearGradientBrush arrowBrush = new LinearGradientBrush(arrowRectangle, Color.LightBlue, Color.Blue, LinearGradientMode.Vertical); DrawArrow(e.Graphics, arrowPen, arrowBrush, arrowRectangle); public static void DrawArrow(Graphics graphics, Pen pen, Brush brush, Rectangle area) { graphics.SmoothingMode = SmoothingMode.AntiAlias; float bodyHeight = (area.Height / 3); float headWidth = (area.Width / 3); float bodyWidth = area.Width - headWidth; path.AddPolygon(points); graphics.FillPath(brush, path); graphics.DrawPath(pen, path); path.Dispose(); // 2 // |\ // | \ //0------1 >3 //6------5 / // |/ // 4 }
You need to login to post a comment.
