views:

163

answers:

1

How do I create code for collision detection on a bitmap rotated by a matrix?

canvas.drawBitmap(mAnimation, mainMatrix, null);

mainMatrix is derived from a PathMeasure so i do not know the rotation The bitmap is rotated around x=0,y=0 and thus a circle around the centre will not work (or at least be too big)

thanks

A: 

Matrix has a method to map points and rectangles, you could use that to know the result of the transformation.

Romain Guy