Problem With Gesture Library

treehousefrog

Member
Licensed User
Longtime User
Hey guys,

So I've made a drawing program using the gesture library to support multitouch. This was working fine until I shrank the size of the canvas (I only want it to take up a portion of the screen) and now the points don't line up with where I press. I think what's happening is that Touchmap is designed for the fullscreen and that I need to do a bit of maths to translate the coordinates. Problem is... I don't know how to do that!

If anyone has any ideas please let me know, stayed up until nearly 5am trying to work this out!

Thanks huge amounts :)
 

Informatix

Expert
Licensed User
Longtime User
Hey guys,

So I've made a drawing program using the gesture library to support multitouch. This was working fine until I shrank the size of the canvas (I only want it to take up a portion of the screen) and now the points don't line up with where I press. I think what's happening is that Touchmap is designed for the fullscreen and that I need to do a bit of maths to translate the coordinates. Problem is... I don't know how to do that!

If anyone has any ideas please let me know, stayed up until nearly 5am trying to work this out!

Thanks huge amounts :)

That's why I NEVER rescale a canvas. It's too messy afterwards. I resize the things drawn onto it. But that doesn't help you much... ;)
 
Upvote 0
Top