本文介绍了如何设置抗锯齿在黑莓风暴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我米如..一个位图绘制

I m drawing in a bitmap like..

bitmap[i] = new Bitmap(60, 60);
Graphics g = new Graphics(bitmap[i]);
g.setColor(Color.BLACK);
g.drawLine(....);

现在如何g.drawLine之前设置抗锯齿()?

Now how to set Anti-Aliasing on before g.drawLine()?

推荐答案

有关抗锯齿模式使用公共无效setDrawingStyle(INT drawStyle,布尔)

有关行使用

graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, true);
graphics.drawLine(x1, y1, x2, y2);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, false);

有关poligons使用

For poligons use

graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, true);
graphics.drawRect(x, y, width, height);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, false);

这篇关于如何设置抗锯齿在黑莓风暴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 16:53
查看更多