I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and motionevent.gety (which are in pixel range )to window or Object coordinates of the view?
\$\begingroup\$
\$\endgroup\$
3
-
\$\begingroup\$ Screen space coordinates are represented in pixels based on the width/height resolution of the device, and are most likely returned as normalized values. I'm a little confused with what you mean by window or object coordinates. \$\endgroup\$– EvanFeb 11, 2013 at 19:17
-
1\$\begingroup\$ thank you for your reply evan have found the answer will post it after couple of hrs as i cannt answer my own question until 8hrs passed. My question anyways was when ever i touch on GLSurfaceview i get coordinates in the form of Motionevent which give x and Y values in pixels. But i need those converted in terms of the coordinates which we pass while drawing on GLSurfaceview. \$\endgroup\$– deepuFeb 11, 2013 at 21:02
-
1\$\begingroup\$ @deepu Mind posting your solution? \$\endgroup\$– dbroFeb 3, 2014 at 20:55
Add a comment
|