Exemplo n.º 1
0
        public void Redraw()
        {
            Point[] points = new Point[4];
            int     r      = (int)(endPoint.X - startPoint.X) / 2;

            var center = new PointF(StartPoint.X + r, startPoint.Y + r);

            points[0] = startPoint;
            points[1] = new Point(startPoint.X + r, startPoint.Y);
            points[2] = endPoint;
            points[3] = new Point(endPoint.X - r - (int)(2 * r), endPoint.Y);


            var brush = new SolidBrush(FillColor);

            DrawPanel.DrawPolygon(DrPen, points);
            DrawPanel.FillPolygon(brush, points);

            brush.Dispose();
        }