コード例 #1
0
ファイル: MyCurve.cs プロジェクト: tsdocode/HCMUTE
 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);
             }
         }
     }
 }