开发者

Android - Setting bitmap collision detection after rotation by matrix

开发者 https://www.devze.com 2023-01-09 14:26 出处:网络
How do I create code for collision d开发者_JAVA百科etection on a bitmap rotated by a matrix? canvas.drawBitmap(mAnimation, mainMatrix, null);

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

精彩评论

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