1、Rect类和RectF类 
参考资料:http://byandby.iteye.com/blog/826230 
管方文档:Rect 类: http://developer.android.com/reference/android/graphics/Rect.html 
RectF类:http://developer.android.com/reference/android/graphics/RectF.html

RectF和Rect都表示的是一个矩形的区域,他们的构造方法类似,详细请看官方文档,这里以RectF为例,如下: 
RectF() :构造一个无参的矩形;

RectF(float left,float top,float right,float bottom)构造一个指定了4个参数的矩形 ,这些参数都是坐标,即矩形的宽width = right - left ,高height = bottom - top;如下图所示 
RectF rectF = new RectF(150,75,260,120); 

150指的是矩形区域左上角的横坐标,即A; 
75指的是矩形区域左上角的纵坐标,即B; 
260指的是矩形区域右下角的横坐标,即C; 
120指的是矩形区域右下角的纵坐标,即D;

RectF(Rect F r)根据指定的RectF对象来构造一个RectF对象(对象的左边坐标不变) 。

RectF(Rect r)根据给定的Rect对象来构造一个RectF对象。

这就是RectF的功能了,Rect 也具有这个功能。两者的区别在于: 
RectF 中的参数是单精度浮点型的; 
Rect 中的参数是整形的。

2、Matrix 
参考资料:http://blog.163.com/lww2626@126/blog/static/27384067201192564628645

http://www.cnblogs.com/plokmju/p/android_Matrix.html#MatrixRotate

http://blog.csdn.net/programchangesworld/article/details/49078387

3、Paint 画笔

参考资料:http://www.cnblogs.com/-OYK/archive/2011/10/25/2223624.html

参数官方API解释:

public RectF (float left, float top, float right, float bottom)

Added in  API level 1

Create a new rectangle with the specified coordinates. Note: no range checking is performed, so the caller must ensure that left <= right and top <= bottom.

Parameters
left The X coordinate of the left side of the rectangle
top The Y coordinate of the top of the rectangle
right The X coordinate of the right side of the rectangle
bottom The Y coordinate of the bottom of the rectangle

百度翻译一下:

用指定坐标创建新矩形。注意:没有进行范围检查,所以调用者必须确保,左<=右和顶部<=底部。

左边矩形的x坐标
矩形顶部的y坐标
右边矩形的x坐标

矩形底部y坐标

更多相关文章

  1. android 坐标布局 AbsoluteLayout
  2. Android -- SharedPreferences保存基本数据、序列化对象、List数
  3. Android 屏幕(View)坐标系统
  4. android 自定义相机 取矩形内内容 注意事项
  5. Android webview与js交换JSON对象数据示例
  6. Android中Intent传递对象的两种方法(Serializable,Parcelable)
  7. Android--用Pull解析器将对象解析成xml文件及单元测试
  8. Xposed: 勾住(Hook) Android应用程序对象的方法,实现AOP

随机推荐

  1. android selector 背景选择器
  2. Dagger2使用
  3. 在android的Browser中设置User Agent
  4. Android的网络抓包工具Tcpdump
  5. android 自带的主题 theme 的使用
  6. 牛人博客收集
  7. Android(安卓)屏幕截图并用WindowManager
  8. android滚动条
  9. ListView之setEmptyView的问题
  10. android中的VersionCode和VersionName到