private void DrawLassoArea(TouchPath touchPath) { _polygon = new Polygon(); _polygon.Fill = new SolidColorBrush(Colors.LightGray); _polygon.Opacity = 0.7; _polygon.Tag = "SELECTED_AREA"; foreach (var point in touchPath.Points) { _polygon.Points.Add(point); } _feedbackCanvas.Children.Add(_polygon); }
public static TouchPath ToTouchPath(this StylusPointCollection self, int deviceId) { TouchPath touchPath = new TouchPath(); touchPath.TouchDeviceId = deviceId; foreach (var item in self) touchPath.Points.Add(new Point(item.X, item.Y)); return touchPath; }