Android(安卓)drawRect参数
16lz
2021-12-04
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 drawnpaint
- The paint used to draw the rect
开发文档是这样写着~不过英语太差,看不懂。
我说一下我的理解吧。left和top是矩形的左上角的坐标,right和bottom是矩形的右下角的坐标,而paint则是画笔对象。而不是矩形的上下左右宽度等错误理解。
更多相关文章
- Android(安卓)简单图形绘制
- Android(安卓)Demos 示例BitmapMesh中部分方法的理解
- Android(安卓)nine-patch 原理解释
- Android(安卓)postTranslate和preTranslate的理解
- android触摸屏坐标手工校准/调整成功
- android触摸屏坐标手工校准/调整成功 (ZZ)
- 绘制圆形、圆角矩形背景
- Android高手进阶教程(四)之----Android(安卓)中自定义属性(attr.
- 对于android触摸事件模型的一些理解