Understanding how actually drawRect or drawing coordinates work in Android

前端 未结 5 481
猫巷女王i
猫巷女王i 2020-12-13 13:22

I am trying to draw a rectangle over a canvas and I am facing troubles to understand the in-depth of rectangle draw of Android. I\'ve read tutorials and every possible but I

5条回答
  •  爱一瞬间的悲伤
    2020-12-13 14:04

    canvas.drawRect(left,top,right,bottom,paint);

    In this

    1. left: distance of the left side of rectangular from left side of canvas.

    2. top:Distance of top side of rectangular from the top side of canvas

    3. right:distance of the right side of rectangular from left side of canvas.
    4. bottom: Distance of the bottom side of rectangle from top side of canvas.

提交回复
热议问题