Android Canvas Draw circle(Canvas canvas, int color, int stroke, float x, float y, float radius)

Here you can find the source of circle(Canvas canvas, int color, int stroke, float x, float y, float radius)

Description

circle

Declaration

public static void circle(Canvas canvas, int color, int stroke,
            float x, float y, float radius) 

Method Source Code

//package com.java2s;
import android.graphics.Canvas;
import android.graphics.Paint;

public class Main {
    public static void circle(Canvas canvas, int color, int stroke,
            float x, float y, float radius) {
        Paint paint = new Paint();
        paint.setColor(color);/*  www .j  a v a2s  . c o m*/
        paint.setStyle(Paint.Style.FILL_AND_STROKE);
        paint.setStrokeWidth(stroke);
        canvas.drawCircle(x, y, radius, paint);
    }
}

Related

  1. drawCross(Bitmap bm, int x, int y)
  2. drawSelect(Bitmap bm, int x, int y, int cellWidth, int cellHeight)
  3. drawText(String strMsg, Canvas g, Paint paint, int setx, int sety, int fg, int bg)
  4. drawTextAtCanvasCenter(Canvas canvas, Paint paint, String text)
  5. rect(Canvas canvas, int color, int stroke, float x, float y, float width, float height)
  6. add(Bitmap firstlayer, Bitmap secondlayer)
  7. add(Bitmap[] images)