public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e) { Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y)); newPolygon = new DrawPencil(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth, drawArea.PenType); minDistance = Convert.ToInt32((15 * drawArea.Zoom) * (15 * drawArea.Zoom)); AddNewObject(drawArea, newPolygon); lastX = e.X; lastY = e.Y; }
public override DrawObject Clone() { DrawPencil drawPolygon = new DrawPencil(); foreach (Point p in pointArray) { drawPolygon.pointArray.Add(p); } FillDrawObjectFields(drawPolygon); return(drawPolygon); }
public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e) { newPolygon = null; base.OnMouseUp(drawArea, e); }