Yes that's the way. I tried it out and it works. I found also a project that has a working implementation of the inverse Matrix and pre-transformations. http://publicobject.googlecode.com/svn-history/r19/whisky/src/com/publicobject/whisky/Element.java It is a good starting point to implement my own scene graph lib.
thx On Wednesday, January 16, 2013 11:46:12 PM UTC+1, bob wrote: > > Every object should have its own Matrix. > > > Then take the inverse of that Matrix and multiply it by the screen > coordinate. The result will be a point that can be compared with the > coordinates of the pre-transformed object. > > > > > > On Wednesday, January 16, 2013 3:07:21 PM UTC-6, strangeoptics wrote: >> >> Hi, >> >> I would like to draw some objects onto a canvas that are translated and >> rotated. >> When I tap on the screen I need to translate the screen coordinates into >> the drawing space of the objects to find out if they are selected. >> >> What is the best way to accomplish this? >> 1) Is there a 2D Scene Grap API available? >> 2) Do I can store the Matrix for every Object and reverse it? The >> canvas.getMatrix() method is deprecated! >> 3) Is there another alternative? >> >> thx >> >> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en