Rect和RectF的区别

 

1、Rect的变量使用int类型,而RectF使用float类型。

2、一些方法区别

<1>、Rect类

equals(Object obj) (for some reason it as it's own implementation of equals)
exactCenterX()
exactCenterY()
flattenToString()
toShortString()
unflattenFromString(String str)


<2>、RectF类
round(Rect dst)
roundOut(Rect dst)
set(Rect src)

你可能感兴趣的:(Rect和RectF的区别)