I have a bitmap image and i want to draw a Square over this image for special position , i researched but i could not found any solution , all solutions are for create Square on empty view , please advise a i am beginner
public class DrawView extends View
{
Paint paint = new Paint();
public DrawView(Context context)
{
super(context);
}
@Override
public void onDraw(Canvas canvas)
{
Paint myPaint = new Paint();
myPaint.setColor(Color.WHITE);
myPaint.setStyle(Paint.Style.STROKE);
myPaint.setStrokeWidth(2);
canvas.drawRect(10, 10, 100, 100, myPaint);
}
}
should i convert my bit map image to convas?how?