示例#1
0
        /// <summary>
        /// Create new object
        /// </summary>
        public override void OnMouseDown(DrawingCanvas drawingCanvas, Point position)
        {
            newPolyLine = new GraphicsPolyLine(
                new Point[]
            {
                position,
                new Point(position.X + 1, position.Y + 1)
            },
                1,
                Colors.Black,
                drawingCanvas.ActualScale);

            AddNewObject(drawingCanvas, newPolyLine);

            lastX = position.X;
            lastY = position.Y;
        }
示例#2
0
        public override void OnMouseUp(DrawingCanvas drawingCanvas, Point position)
        {
            newPolyLine = null;

            base.OnMouseUp(drawingCanvas, position);
        }