本文介绍了绘制旋转的位图与抗混的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试着画一个旋转的位图与抗混打开,但它仍然有别名,它的不顺利,任何帮助?
我做如下:
最终涂料P =新的油漆(Paint.ANTI_ALIAS_FLAG);
p.setAntiAlias(真正的);
canvas.rotate(-mValues [0]);
canvas.drawBitmap(罗盘,-compass.getWidth()/ 2,-compass.getHeight()/ 2,p)的;
解决方案
Paint.setAntiAlias()
是文本。
您想要 p.setFilterBitmap(真)
;
I tried to paint a rotated bitmap with anti alias turned on, but it still has alias and it's not smooth, any help?
I did as following:
final Paint p = new Paint(Paint.ANTI_ALIAS_FLAG);
p.setAntiAlias(true);
canvas.rotate(-mValues[0]);
canvas.drawBitmap(compass, -compass.getWidth()/2,-compass.getHeight()/2,p);
解决方案
Paint.setAntiAlias()
is for text.
You want p.setFilterBitmap(true)
;.
这篇关于绘制旋转的位图与抗混的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!