Android RectF函数


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

根据指定坐标创建一个长方形,需要注意的是,此函数没有边界检查,所以输入要确保bottom 参数:
left 长方形左侧的x坐标
top 长方形顶的Y坐标
right 长方形右侧的X坐标
bottom 长方形底的Y坐标
例如:

RectF rf1 = new RectF(100,100,300,200);

在屏幕中的位置如图:

Android RectF函数_第1张图片
Paste_Image.png

可以理解为左上角为点(100,100),右下角为点(300,200)。相应的右上角为(300,100),左下角为(100,200)

参考:
http://blog.csdn.net/chenxu6/article/details/41399355

你可能感兴趣的:(Android RectF函数)