Exemplo n.º 1
0
 /// <summary>
 /// Left mouse button is pressed
 /// </summary>
 public override void OnMouseDown(MkaDocument docArea, MouseEventArgs e)
 {
     // Create new polygon, add it to the list
     // and keep reference to it
     newPolygon = new DrawPolygon(e.X, e.Y, e.X + 1, e.Y + 1);
     AddNewObject(docArea, newPolygon);
     lastX = e.X;
     lastY = e.Y;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Clone this instance
        /// </summary>
        public override DrawObject Clone()
        {
            DrawPolygon drawPolygon = new DrawPolygon();

            foreach (Point point in this.Points)
            {
                drawPolygon.Points.Add(point);
            }
            drawPolygon.Properties.RShowPosition = this.Properties.RShowPosition;
            drawPolygon.Properties.RShowTop      = this.Properties.RShowTop;
            drawPolygon.Properties.RShowBottom   = this.Properties.RShowBottom;

            FillDrawObjectFields(drawPolygon);
            return(drawPolygon);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Left mouse button is released
        /// </summary>
        public override void OnMouseUp(MkaDocument docArea, MouseEventArgs e)
        {
            newPolygon = null;

            base.OnMouseUp(docArea, e);
        }