Example #1
0
        public override void TouchesMoved(NSSet touches, UIEvent evt)
        {
            base.TouchesMoved(touches, evt);

            var loc = (touches.AnyObject as UITouch).LocationInView(this);

            CurrentPathView.AddLineTo(loc);
            CurrentStroke.Points.Add(new Point(loc.X, loc.Y));

            SetNeedsDisplay();
        }
Example #2
0
        public override void TouchesEnded(NSSet touches, UIEvent evt)
        {
            base.TouchesEnded(touches, evt);

            if (!Enabled)
            {
                return;
            }

            var loc = (touches.AnyObject as UITouch).LocationInView(this);

            CurrentStroke.Points.Add(new Point(loc.X, loc.Y));
            CurrentPathView.AddLineTo(loc);

            Strokes.Add(CurrentStroke);
            drawPath();

            CurrentPathView.Clear();
            SetNeedsDisplay();
        }