drawRect

public void drawRect(float left,                     float top,                     float right,                     float bottom,                     Paint paint)


Draw the specified Rect using the specified paint. The rectangle will be filled or framed based on the Style in the paint.

参数:
left - The left side of the rectangle to be drawn
top - The top side of the rectangle to be drawn
right - The right side of the rectangle to be drawn
bottom - The bottom side of the rectangle to be drawn

paint - The paint used to draw the rect


开发文档是这样写着~不过英语太差,看不懂。

我说一下我的理解吧。left和top是矩形的左上角的坐标,right和bottom是矩形的右下角的坐标,而paint则是画笔对象。而不是矩形的上下左右宽度等错误理解。


更多相关文章

  1. Android(安卓)简单图形绘制
  2. Android(安卓)Demos 示例BitmapMesh中部分方法的理解
  3. Android(安卓)nine-patch 原理解释
  4. Android(安卓)postTranslate和preTranslate的理解
  5. android触摸屏坐标手工校准/调整成功
  6. android触摸屏坐标手工校准/调整成功 (ZZ)
  7. 绘制圆形、圆角矩形背景
  8. Android高手进阶教程(四)之----Android(安卓)中自定义属性(attr.
  9. 对于android触摸事件模型的一些理解

随机推荐

  1. hibernate(*.hbm.xml)中新添加的字段被标记
  2. 浅谈:如何用java写一个简单的基于MySQL的J
  3. flash如何自动连接mysql数据库
  4. Windows下重置MySQL密码【MYSQL】
  5. MySQL5.7完全卸载
  6. MySQL数据导入到infobright中
  7. MySQL在C++中使用后务必释放 result,否则
  8. 利用keepalived构建高可用MySQL-HA
  9. MySQL表格查询基本语句2
  10. 组织这种结构的最佳方式?