Android Rect和RectF的区别

来源:互联网 发布:电信封80端口 编辑:程序博客网 时间:2024/05/20 23:33

Android Rect和RectF的区别

1、精度不一样,Rect是使用int类型作为数值,RectF是使用float类型作为数值
2、两个类型提供的方法也不是完全一致

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

RectF:
round(Rect dst)
roundOut(Rect dst)
set(Rect src)

 

sourceurl:http://longshuai2007.blog.163.com/blog/static/142094414201161832810371/

0 0
原创粉丝点击