将笔画与路径进行比较
我想分析用户在 InkPresenter 上对模板的输入。
Pseudo-xaml
<Canvas>
<Canvas ScaleTransform="to match parent size">
<Path Data="some line or bezier">
<InkPresenter>
因此,本质上,我需要的是确定相对于路径在屏幕上绘制的顶级画布的实际点。另外,我需要知道方向性,即笔划的起点是否在路径起点附近?
也许手动渲染线条/曲线而不是使用 Path.Data 会更好?
I want to analyze a user's input on an InkPresenter to a template.
Pseudo-xaml
<Canvas>
<Canvas ScaleTransform="to match parent size">
<Path Data="some line or bezier">
<InkPresenter>
So, essentially, what I need is to determine the actual points, relative to the top level Canvas that the Path drew on the screen. Also, I need to know directionality, i.e. did the start of the Stroke start near the start of the Path?
Perhaps it would be better to manually render the lines/curves instead of using the Path.Data?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我将计算路径的位置,以便与鼠标向下、移动和向上时的 StylusPoints 进行比较。非常直接地前进。此代码非常有用 - http://eztier.com/dba2day/?p=181
Well, I'm going with calculating the location of the Path to compare with StylusPoints on mouse down, move, and up. Going pretty straight forward. This code is very helpful - http://eztier.com/dba2day/?p=181