动画路径就像在画布上绘制的一样 [英] Animate a path like it's drawn on a canvas

查看:44
本文介绍了动画路径就像在画布上绘制的一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 WPF 的新手,请指导我朝着正确的方向解决这个问题.

I'm a newbie in WPF and please, guide me in the right direction for this problem.

我构建了一个 WPF 应用程序,其中包含路线图视图控件的所有功能.IE.路线图可以放大/缩小,使用鼠标、键盘和提供的控件向各个方向平移.我已将道路映射为使用 Expression Blend 绘制的路径.

I have built a WPF application which contains all the functionality of that of a road map view control. I.e. the road map can be zoomed in/out, panned in all directions using mouse, keyboard and the controls provided. I have mapped the roads as paths drawn using Expression Blend.

目前我正在寻找一种方法来为选定的道路设置动画,就好像它是用铅笔/钢笔/记号笔绘制的一样.这可能吗?到目前为止,我已经能够为路径的不透明度和颜色设置动画.我已经搜索了很多这个功能,但没有运气.可能是我没有搜索正确的术语.我希望你们中的某个人可以对这个问题有所了解.

Currently I am looking for a way to animate a selected road, as if it was drawn by a pencil/pen/marker. Is this possible? So far, I've been able to animate the opacity and color of the path. I've search a lot for this functionality with no luck. May be I do not search for the correct terms. I hope someone of you could shed some light on to this matter.

提前致谢.对不起,如果我听起来很疯狂:) 编程是我疯狂的方式 :D

Thanks in advance. Am sorry, if I sound crazy :) Programming is my way of being crazy :D

推荐答案

我不想在评论中出现,这是一篇很棒的帖子:

I don't won't it to be amidst of comments, here's a great post:

http://social.msdn.microsoft.com/Forums/en/wpf/thread/19a7bd4b-cf28-4b31-a329-a5f58b9ec374

这是 Charles Petzold 对这个问题的看法:

and here's is Charles Petzold's take on the problem:

http://www.charlespetzold.com/blog/2006/08/150351.html

这篇关于动画路径就像在画布上绘制的一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆