Beispiel #1
0
		protected virtual void StartStroke(Contact contact)
		{
			StylusPointCollection stylusPoints = new StylusPointCollection();
			Point position = contact.GetPosition(this);
			stylusPoints.Add(new StylusPoint(position.X, position.Y, 0.5f));
			Stroke stroke = new Stroke(stylusPoints, DefaultDrawingAttributes);
			inkCanvas.Strokes.Add(stroke);
			contact.SetUserData(key, stroke);
		}
Beispiel #2
0
		private void RemovePartialStroke(Contact contact)
		{
			Stroke stroke = (Stroke) contact.GetUserData(key);
			if(stroke != null)
			{
				inkCanvas.Strokes.Remove(stroke);
				contact.SetUserData(key, null);
			}
		}