Paint p = new Paint();
p.setAntiAlias(true);
p.setColor(Color.DKGRAY);
int y=getWindowManager().getDefaultDisplay().getWidth();
Config conf = Bitmap.Config.RGB_565;
Bitmap bmp =Bitmap.createBitmap(y,y,conf);
Canvas c = new Canvas(bmp);
c.drawCircle(y/2 ,y/2, y/3, p);
iv.setBackgroundDrawable(new BitmapDrawable(bmp));
通过这段代码,我确实得到了圆圈,它看起来像:-
现在的问题是它看起来不像一个真正的圆形,它看起来像一个椭圆形..
所以我该怎么做 ??
提前致谢,....