[android-developers] Re: How to implement a selection mechanism for translated and rotated objects on a canvas?

2013-01-18 Thread bob
Yeah, I pretty much asked that question of the Java group a few months ago: https://groups.google.com/d/topic/comp.lang.java.programmer/kA2JLneZmTc/discussion On Thursday, January 17, 2013 2:29:09 PM UTC-6, strangeoptics wrote: > > Yes that's the way. I tried it out and it works. > I found also

[android-developers] Re: How to implement a selection mechanism for translated and rotated objects on a canvas?

2013-01-17 Thread strangeoptics
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 ow

[android-developers] Re: How to implement a selection mechanism for translated and rotated objects on a canvas?

2013-01-16 Thread bob
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 wro