Example #1
0
		public override void TouchesBegan (NSSet touches, UIEvent evt)
		{
			IndexCount++;

			var path = new UIBezierPath
			{
			    LineWidth = PenWidth
			};

		    var touch = (UITouch)touches.AnyObject;
			PreviousPoint = touch.PreviousLocationInView (this);

			var newPoint = touch.LocationInView (this);
			path.MoveTo (newPoint);

			InvokeOnMainThread (SetNeedsDisplay);

			CurrentPath = path;

			var line = new VESLine
			{
				Path = CurrentPath, 
				Color = CurrentLineColor,
				Index = IndexCount 
			};

			Lines.Add (line);
		}
Example #2
0
        public override void TouchesBegan(NSSet touches, UIEvent evt)
        {
            IndexCount++;

            var path = new UIBezierPath
            {
                LineWidth = PenWidth
            };

            var touch = (UITouch)touches.AnyObject;

            PreviousPoint = touch.PreviousLocationInView(this);

            var newPoint = touch.LocationInView(this);

            path.MoveTo(newPoint);

            InvokeOnMainThread(SetNeedsDisplay);

            CurrentPath = path;

            var line = new VESLine
            {
                Path  = CurrentPath,
                Color = CurrentLineColor,
                Index = IndexCount
            };

            Lines.Add(line);
        }