private void paper_MouseMove(object sender, MouseEventArgs e) { if (canDraw == true) { end = new Diem(e.X, e.Y); g.Clear(paper.BackColor); if (pointer) { return; } else if (isLine == true) { g.DrawLine(pen, begin.x, begin.y, e.X, e.Y); } else if (isElise == true) { rect.Size = new Size(end.x - begin.x, end.y - begin.y); g.DrawEllipse(pen, rect); } Update(); } }
public Ellipse(Diem A, Diem B) { begin = A; end = B; }
public Ellipse() { begin = new Diem(0, 0); end = new Diem(0, 0); }
public Line(Diem A, Diem B) { begin = A; end = B; }
public Line() { begin = new Diem(0, 0); end = new Diem(0, 0); }