문제

I'm working with canvas im my application and I need to draw a circle.
To do that, I'm using the drawCicle(cx, cy, radious, paint) method for the canvas class.
The problem is that the circle's edges appear pixellated. And its kinf of oval.

This is my code:

public void drawCircle(){       
    Paint paint = new Paint();
    paint.setColor(Color.rgb(52, 73, 94));
    canvas.drawCircle(200, 300, 33, paint);     
}

enter image description here

도움이 되었습니까?

해결책

Use paint.setFlags(Paint.ANTI_ALIAS_FLAG)

This enables anti-aliasing => edges become smoother

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top