I'm trying to copy inkstrokes between different inkcanvas.
So far that's what I tried.
///Getting strokes from the first inkcanvas
public StrokeCollection MyStrokes;
MyStrokes = BigInkCanvas.Strokes;
///Trying to restore the strokes on the other inkcanvas
SmallerInkCanvas.Strokes = MyStrokes
And that's what I get
Is there a way to "resize" the ink strokes so it can fit on the smaller inkcanvas
You could apply a transform matrix to it to scale to the new canvas' bounding rectangle.
Consider you have a 500x250 px canvas. And you wish to scale to a 400x150 matrix.
That transform is 100px across the x axis and 100px across the y axis.
If we consider this a scale it would be instead 20% and 60% smaller.
If we turn that into a matrix we should then be able to apply that matrix to the strokes to scale them using their
PointTransformproperty.(UWP) or it's.Transform()method (WPF)Disclaimer: Not tested, written on mobile