MouseMove event too slow for painting

会有一股神秘感。 提交于 2019-12-05 12:36:12

OTTOMH, you could keep track of the last point the mouse was and in your MouseMove handler you can assume linear motion and determine all the tiles between the last point and the current point. My guess is that you're not likely to ever get enough MouseMove events to fire to handle the case where the user moves his mouse very quickly.

Awesome! worked perfectly.

I used the DDA line algorithm from here

http://www.cs.unc.edu/~mcmillan/comp136/Lecture6/Lines.html

to draw the line.

Thanks!!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!