-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawLine.cs
More file actions
40 lines (30 loc) · 860 Bytes
/
Copy pathDrawLine.cs
File metadata and controls
40 lines (30 loc) · 860 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
34
35
36
37
38
39
40
using DocumentFormat.OpenXml.Drawing.Charts;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProgrammingLanguageIDE
{
public class DrawLine : Shape
{
int xCor, yCor;
public DrawLine():base()
{
}
public override void set(params int[] list)
{
base.set(list[0], list[1]);
this.xCor = list[2];
this.yCor = list[3];
}
public override void draw(Graphics g, bool fill,Color color)
{
Pen p = new Pen(color,2);
PointF firstPoint = new PointF(x, y);
PointF secondpoint = new PointF(xCor, yCor);
g.DrawLine(p, firstPoint, secondpoint);
}
}
}