Reputation: 8433
canvas.drawRect(left, top, right, bottom, paint);
Say I want to draw rectangle
x=30 to x=35 of height y=50. What would be the values in above method. Thank you very much.
Upvotes: 0
Views: 2039
Reputation: 4854
Try:
canvas.drawRect(30,0,35,50,Reference_to_Paint_Object);
This is assuming that you want the rectangle to start at the top of the screen. Change the 2nd parameter to set the top location. You will also need to construct a Paint object to pass to the last parameter.
Upvotes: 1