Canvas' drawLine and drawRect not including end position?

后端 未结 4 1087
无人共我
无人共我 2021-02-13 03:20

To my surprise I\'ve just discovered that drawLine and drawRect don\'t include the ending position, i.e.:

canvas.drawLine(100, 100, 100, 100, paint);
4条回答
  •  一个人的身影
    2021-02-13 03:40

    Your rect should work fins, try to add some background, your line is now kust a pixel, the two last parameter is not the length, its the end posision.

提交回复
热议问题