Android : Drawing a Square - Android

on Thursday, September 18, 2014


I'm trying to draw a simple square using canvas in android. The canvas is spread through the whole screen.


My code is -



canvas.drawRect(200, 200, 700, 700, paint);


(It's hard coded for testings)


but the result does not look like a square at all (the height seems to be larger than the width).


Is my logic wrong?


Here's a screenshot of the result.


enter image description here


Thanks!


0 comments:

Post a Comment