Android Canvas Draw drawCross(Bitmap bm, int x, int y)

Here you can find the source of drawCross(Bitmap bm, int x, int y)

Description

draw Cross

Declaration

public static void drawCross(Bitmap bm, int x, int y) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;
import android.graphics.Canvas;

import android.graphics.Paint;

public class Main {
    public static void drawCross(Bitmap bm, int x, int y) {
        Canvas c = new Canvas(bm);
        Paint p = new Paint();
        p.setColor(0xffff0000);/*w  w  w. j a  va  2 s.c om*/
        c.drawLine(x - 4, y, x + 4, y, p);
        c.drawLine(x, y - 4, x, y + 4, p);
    }
}

Related

  1. drawSelect(Bitmap bm, int x, int y, int cellWidth, int cellHeight)
  2. drawText(String strMsg, Canvas g, Paint paint, int setx, int sety, int fg, int bg)
  3. drawTextAtCanvasCenter(Canvas canvas, Paint paint, String text)
  4. circle(Canvas canvas, int color, int stroke, float x, float y, float radius)