Beispiel #1
0
 private void UpdatePathPoints(GameImagePath path, InkCanvas canvas)
 {
     if (path.canvasWidth != canvas.ActualWidth || path.canvasHeight != canvas.ActualHeight)
     {
         for (int index = path.points.Count - 1; index >= 0; index--)
         {
             Point point = path.points[index];
             path.points[index] = new Point((point.X / path.canvasWidth) * canvas.ActualWidth, (point.Y / path.canvasHeight) * canvas.ActualHeight);
         }
     }
 }
Beispiel #2
0
 public DrawingUpdate(GameImagePath stroke = null, GameImage image = null)
 {
     path       = (stroke != null) ? stroke : new GameImagePath();
     this.image = (image != null) ? image : new GameImage();
 }