-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCircle.cs
More file actions
33 lines (29 loc) · 972 Bytes
/
Circle.cs
File metadata and controls
33 lines (29 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Drawing;
namespace ProjectOOP
{
internal class Circle : Tool
{
public Circle(Color color, float width) : base(color, width) { }
public override void Draw(Graphics g, Point start, Point end)
{
if (start == end)
{
//Brush brush = new SolidBrush(this.color);
//g.FillEllipse(brush, start.X - this.width / 2, start.Y - this.width / 2, width, width);
}
else
{
int x = Math.Min(start.X, end.X);
int y = Math.Min(start.Y, end.Y);
int width = Math.Abs(start.X - end.X);
int height = Math.Abs(start.Y - end.Y);
g.DrawEllipse(base.pen, x, y, width, height);
}
}
public override void Draw(Graphics g, Point start, Point end, Bitmap bitmap)
{
throw new NotImplementedException();
}
}
}