如何设置抗锯齿在黑莓风暴? [英] How to set Anti Aliasing in Blackberry Storm?

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

问题描述

我米如..一个位图绘制

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()?

推荐答案

有关抗锯齿模式使用<一个href=\"http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/ui/Graphics.html#setDrawingStyle%28int,%20boolean%29\"相对=nofollow>公共无效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);

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

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