Android中Rect和RectF的区别
16lz
2021-01-25
1、精度不一样,Rect是使用int类型作为数值,RectF是使用float类型作为数值
2、两个类型提供的方法也不是完全一致,如下所示:
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)
更多相关文章
- 一起学android之SharedPreferences 讲解(10)
- 我的Android学习笔记2(学Android怎能不懂java)
- Android(安卓)ORM 框架之 ActiveAndroid应用基础
- android上一些类型转换
- kotlin超简单recyclerView测试
- Android(安卓)定位GPS的使用
- Android(安卓)- 分享内容 - 给其他APP发送内容
- android是32-bit系统还是64-bit系统
- 从零开始--系统深入学习android(实践-让我们开始写代码-Android框