-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEraser.cs
More file actions
30 lines (26 loc) · 777 Bytes
/
Eraser.cs
File metadata and controls
30 lines (26 loc) · 777 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
using System.Drawing;
namespace ProjectOOP
{
internal class Eraser : Tool
{
public Eraser(float width) : base(Color.White, width) {
pen.Color = Color.White;
}
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
{
g.DrawLine(base.pen, end, start);
}
}
public override void Draw(Graphics g, Point start, Point end, Bitmap bitmap)
{
throw new System.NotImplementedException();
}
}
}