BlackBerry Storm에서 Anti Aliasing을 설정하는 방법은 무엇입니까?
-
20-09-2019 - |
문제
나는 비트 맵처럼 ..
bitmap[i] = new Bitmap(60, 60);
Graphics g = new Graphics(bitmap[i]);
g.setColor(Color.BLACK);
g.drawLine(....);
이제 G.Drawline () 전에 안티 아리 아싱을 설정하는 방법은 무엇입니까?
해결책
항아리아링 모드 사용 공개 void setDrawingStyle (Int DrawStyle, Boolean on)
라인 사용을 위해
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, true);
graphics.drawLine(x1, y1, x2, y2);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AALINES, false);
Poligons 사용
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, true);
graphics.drawRect(x, y, width, height);
graphics.setDrawingStyle(Graphics.DRAWSTYLE_AAPOLYGONS, false);
제휴하지 않습니다 StackOverflow