Android中的DrawRect()参数解析

来源:互联网 发布:华为云计算部门北京 编辑:程序博客网 时间:2024/05/01 20:39

转自 http://blog.csdn.net/jeffdeen/article/details/50000151


官方文档中的定义:

drawRect(float left, float top, float right, float bottom, Paint paint)
  • 1
  • 1

Draw the specified Rect using the specified paint.

下面我用一张图来解析各个参数。

这里写图片描述
X轴为手机顶部,y轴为手机左边,各个参数的意思就是到这两边的距离。

0 0
原创粉丝点击