drawRect方法的官方API文档描述

drawRect
public void drawRect(int x,
int y,
int width,
int height)
Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the graphics context's current color.
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.

width和height的描述是错误的。

实践告诉我们,width,height参数应该是右下角的点的坐标。

最新文章

  1. ASP.NET MVC——模型绑定
  2. Python成长笔记 - 基础篇 (十一)
  3. iSCSI 与 ceph
  4. Android开发学习笔记:浅谈WebView(转)
  5. [BS-14] 打印NSArray和NSDictionary的3种方法
  6. UI控件tag属性和魔法数字的处理
  7. Android使用Webview加载网页
  8. Spring talk简单配置
  9. 猪满满 购物APP
  10. intellij安装 配置 创建项目
  11. 利用谷歌 kaptcha 进行验证码生成
  12. JavaScript中创建命名空间
  13. Java Map List 的使用
  14. 微信小程序红包开发 小程序发红包 开发过程中遇到的坑 微信小程序红包接口的
  15. python 生产者 --- 消费者
  16. Python相关
  17. Ogre Compositor解析
  18. [工具] Textify – 复制不可能的窗口内容[Win]
  19. qScrollArean的使用
  20. webpack快速入门——实战技巧:优雅打包第三方类库

热门文章

  1. 记一次 Windows MySQL 恢复
  2. Amazon S3 分布式存储的 python 接口实现
  3. 用gcc/g++编译winsock程序
  4. 如何使用Python连接ldap
  5. Entity Framework 6.0 入门系列 第一篇
  6. 图表控件业界革命 -Arction新产品LightningChart JS 上市
  7. Flac无损音频导入premiere
  8. 2013-2014 ACM-ICPC Pacific Northwest Regional Contest D.Delta Quadrant
  9. CodeForces 909E
  10. .net core api服务端跨域配置