开发者

Android - Setting bitmap collision detection after rotation by matrix

How do I create code for collision d开发者_JAVA百科etection 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜