有没人做过J2ME画圆的问题,我现在有圆点的坐标和半径,要怎么画圆啊,用drawline来一点一点的画太麻烦了 ··
------解决方案--------------------------------------------------------
drawArc 绘制弧线
fillArc 填充扇形
圆不过是特殊一点已而
//绘制以(x,y)为圆心,r为半径的圆
void drawCircle(Graphics g,int x,int y,int r)
{
g.drawArc(x-r,y-r,2*r,2*r,0,360);
}
//填充以(x,y)为圆心,r为半径的圆
void fillCircle(Graphics g,int x,int y,int r)
{
g.fillArc(x-r,y-r,2*r,2*r,0,360);
}