Пример #1
0
 public override void Draw(Graphics gp)
 {
     gp.DrawCurve(Pen, LPoints.ToArray());
     GPPaths.Reset();
     GPPaths.AddCurve(LPoints.ToArray());
     if (IsSelected)
     {
         using (var brush = new SolidBrush(Color.Blue))
             LPoints.ForEach(p => gp.FillRectangle(brush, new Rectangle(p.X - 4, p.Y - 4, 8, 8)));
     }
 }
Пример #2
0
 public override void Draw(Graphics gp)
 {
     GPPaths.Reset();
     GPPaths.AddCurve(LPoints.ToArray());
     if (IsFilled)
     {
         gp.FillPath(Brush, GPPaths);
     }
     if (IsDrawBorder)
     {
         gp.DrawPath(Pen, GPPaths);
     }
     if (IsSelected)
     {
         using (Brush brush = new SolidBrush(Color.Blue))
         {
             for (int i = 0; i < LPoints.Count; i += 4)
             {
                 gp.FillRectangle(brush, LPoints[i].X - 4, LPoints[i].Y - 4, 8, 8);
             }
         }
     }
 }