Find the coordinates of each point in an InkCanvas

408 views Asked by At

In my UWP app I'm trying to obtain the coordinates of each point that is part of an ink stroke in an InkCanvas, but the official documentation doesn't seem to talk about it, do anyone know how to do this?

1

There are 1 answers

0
Deolus On BEST ANSWER

Just guessing but from the documentation it looks like:

foreach (Stroke s in yourInkCanvas.Strokes)
{
    foreach (StylusPoint sp in s.StylusPoints)
    {
        double X = sp.X;
        double Y = sp.Y;
    }
}