draw Circle on Canvas - Android Graphics

Android examples for Graphics:Canvas

Description

draw Circle on Canvas

Demo Code


import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;

public class Main{
    public static void drawCircle(Canvas mcanvas, float cx, float cy,
            float radius, Paint paint) {
        mcanvas.drawCircle(cx * GameView.screen_width
                / GameView.standard_width, cy * GameView.screen_height
                / GameView.standard_height, radius * GameView.screen_width
                / GameView.standard_width, paint);
    }/*w  w  w. j a  v a  2  s.  co m*/
}

Related Tutorials