翻转画布的Andr​​oid [英] Flip an Android Canvas

查看:95
本文介绍了翻转画布的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个简单的方法来翻动Android的画布?我不能似乎发现了什么,让我到垂直翻转它,以便在y轴零是手机屏幕,而不是顶部的底部。这是确定的,如果解决方案不是特别快,因为我没有做任何事情与画布计算密集型。

Is there an easy way to flip a canvas in Android? I cant seem to find anything that allows me to flip it vertically so that zero on the y-axis is the bottom of the phone screen instead of the top. It's OK if the solution isn't especially fast because I'm not doing anything computationally intense with the canvas.

先谢谢了。

推荐答案

尝试

canvas.scale(0,-1,width/2,height/2)

这篇关于翻转画布的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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