How to convert Path to InkStroke [WinRT]
in my windows store app I have a Brush tool that upon mouseUp/TouchUp
redraws whatever the user drew into smooth bezier curves. These are saved
as inkstrokes. I then have a "Reshape" tool that allows the user to
reshape the ink strokes.
The inkstrokes are composed of individual bezier segments. The reshaping
is done by figuring out which segment is being manipulated, erasing the
entire ink stroke, and drawing a new Path with the manipulated segment
changed. The reshaping works fine, however, now I have a Path and would
Like to convert it back to an ink stroke. The only way I can think of so
far is to get the Path.Geometry.Figures().Segments() and do some math to
calculate the points on each individual segment, followed by using
InkStrokeBuilder.Create(PointCollection) to create a new inkStroke. I
haven't done it yet, so I am not even sure if it would work, but this
seems like it would be intensive, as it would have to calculate the
individual points for every segment, and depending on how accurate I would
like it, it would have to calculate many points.
Is there a simpler way to convert a Path to an InkStroke?
No comments:
Post a Comment