Rect and RectF in Android(安卓)SDK
16lz
2022-04-02
转载:http://stackoverflow.com/questions/4913643/rect-and-rectf-in-android-sdk
UsingRect
you define its edges using integers and usingRectF
they are defined as floats.
Looking at them more carefully I have spotted a few differences actually. I will only list what one implementation has more compared to the other one.
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)
So apparently there are some differences.
更多相关文章
- Android(安卓)TableLayout设计模板
- android gmail 添加附件(转载)
- Android中自定义Dialog常用的两种方式
- 转载:Android(安卓)获取ROOT权限原理解析
- [Android] [ANR的原理、分析、实战] 【转载】
- 转载关于android高效显示图片的文章---From 移动微技
- android4.0 添加一个新的android 键值(转载)
- Android:DropPopMenu — 显示位置跟随操作按钮显示的带箭头的弹出
- android 多点触摸实现图片缩放