Beispiel #1
0
        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;
        }
Beispiel #2
0
        public override DrawObject Clone()
        {
            DrawPencil drawPolygon = new DrawPencil();

            foreach (Point p in pointArray)
            {
                drawPolygon.pointArray.Add(p);
            }

            FillDrawObjectFields(drawPolygon);
            return(drawPolygon);
        }
Beispiel #3
0
 public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e)
 {
     newPolygon = null;
     base.OnMouseUp(drawArea, e);
 }