旋转矩形在安卓2D图形? [英] rotate rect in android 2d graphics?

查看:203
本文介绍了旋转矩形在安卓2D图形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要旋转矩形(不仅画出旋转的矩形,但得到了新的旋转值)在Android中,我试图

i want to rotate a rect(not only draw rotated rect but get the new rotated value ) in android ,i tried

canvas.rotate

但它并没有反映在矩形的新值它只是画一个旋转的拍摄。

but it didn't reflect the new values on the rect its just draw a rotated rec.

这是没有帮助我,因为我使用了矩形的碰撞检测

And this is not helping me because i used the rect in collision detection

有没有办法来旋转矩形的模型不仅画一个旋转的?

感谢

推荐答案

我同意grWE​​n,请尝试使用的OpenGL-ES。你可以看到这篇博客,它真的帮助了我。 这里:<一href="http://blog.jayway.com/2010/01/01/opengl-es-tutorial-for-android-%E2%80%93-part-iii-%E2%80%93-transformations/" rel="nofollow">http://blog.jayway.com/2010/01/01/opengl-es-tutorial-for-android-%E2%80%93-part-iii-%E2%80%93-transformations/

i agree with grWEn, try using opengl-es. you can read this blog, it really helped me. Here: http://blog.jayway.com/2010/01/01/opengl-es-tutorial-for-android-%E2%80%93-part-iii-%E2%80%93-transformations/

这篇关于旋转矩形在安卓2D图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆