Help with a simple Paint clone in Win32
-
Hello everyone! Miss me? No? Aww. :( Anyway, I'm trying to make a very simplistic Paint clone. I have a question: I trap mouse drawing with WM_MOUSEMOVE. However, it draws in dots, as in, if I want a doodle I have to go very slowly. How would I fix this? Maybe interpolating; drawing a line between the previous and current dots? But that would be very squareish... Can somebody fill me with their wisdom so I can figure this out? Thanks!
Windows Calculator told me I will die at 28. :(
-
Hello everyone! Miss me? No? Aww. :( Anyway, I'm trying to make a very simplistic Paint clone. I have a question: I trap mouse drawing with WM_MOUSEMOVE. However, it draws in dots, as in, if I want a doodle I have to go very slowly. How would I fix this? Maybe interpolating; drawing a line between the previous and current dots? But that would be very squareish... Can somebody fill me with their wisdom so I can figure this out? Thanks!
Windows Calculator told me I will die at 28. :(
Windows does not send the application a WM_MOUSEMOVE message for each pixel the mouse pointer passes on, hence you have to deal with a discrete set of disconnected points. You can either (as you realized) connect them with straight lines the obtained point or use some curve (for instance splines) to make the path appear smoother. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles] -
Windows does not send the application a WM_MOUSEMOVE message for each pixel the mouse pointer passes on, hence you have to deal with a discrete set of disconnected points. You can either (as you realized) connect them with straight lines the obtained point or use some curve (for instance splines) to make the path appear smoother. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
[my articles]I'll try the straight line then and then the curved one, if it doesn't look good. Thanks! ;)
Windows Calculator told me I will die at 28. :(