You'll have to compute that yourself, it is the canvas applying the
transforamtion, the Drawable knows nothing about it.

(Btw, doing setBounds() every time you draw is not desired...  if you are
writing a game like thing with a moving pull I would generally recommend
dumping the Drawable abstraction and just directly drawing bitmaps.)

On Fri, Apr 24, 2009 at 11:50 AM, Andrea <andrea.pai...@gmail.com> wrote:

>
> Hi all,
> I need to know the coordinates of a drawable object after its
> rotation?
> Here the code (ball is Drawable):
>
>  canvas.save();
>  canvas.rotate(degree, pivot_x,pivot_y);
>  ball.setBounds(...);
>  ball.draw(canvas);
>  canvas.restore();
>
> What are new coordinates of the ball? I tried with ball.getBounds()
> but it contains original coordinates.
> Thank you all
>
> Andrea
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to