-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDrawedPoint.cs
More file actions
35 lines (33 loc) · 1.19 KB
/
DrawedPoint.cs
File metadata and controls
35 lines (33 loc) · 1.19 KB
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
34
35
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
namespace CodePainterApp
{
public class DrawedPoint
{
public Color Color { set; get; }
public Point Point { set; get; }
public Size Size { set; get; }
public DrawedPoint(Point point, Color color, Size size)
{
Point = point;
Color = color;
Size = size;
}
public void Draw(Graphics g)
{
SolidBrush sb = new SolidBrush(this.Color);
g.FillRectangle(sb, Point.X, Point.Y, Size.Width, Size.Height);
Debug.WriteLine("Point X = " + Point.X + " Y = " + Point.Y + " Color = "+this.Color + " Size = ( "+Size.Width+" x "+Size.Height+" ) ");
}
public void Clear(Graphics g)
{
SolidBrush sb = new SolidBrush(Color.DarkSlateGray);
g.FillRectangle(sb, Point.X, Point.Y, Size.Width, Size.Height);
Debug.WriteLine("Point X = " + Point.X + " Y = " + Point.Y + " Color = " + this.Color + " Size = ( " + Size.Width + " x " + Size.Height + " ) ");
}
}
}