Hello, I am trying to draw rectangle on top of image and I am having trouble placing the art on the image. Only part of Rectangle shows up somewhere in bottom of screen. Here is what I am doing:
sinewave is the image from res>drawable folder
public void onDraw(Canvas canvas)
{
Bitmap myBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.sinewave);
canvas.drawBitmap(myBitmap, 0, 0, null);
Paint myPaint = new Paint();
myPaint.setColor(Color.GREEN);
myPaint.setStyle(Paint.Style.STROKE);
myPaint.setStrokeWidth(3);
canvas.drawRect(0, 35 ,80 , 20, myPaint);
}
I am not able to go beyond 35, I want to place the rectangle right in the middle of sinewave's image. Can some one help me with their ideas.