您的位置:首页 > 移动开发 > Android开发

Rect and RectF in Android SDK

2011-11-18 17:32 337 查看
转载:http://stackoverflow.com/questions/4913643/rect-and-rectf-in-android-sdk

Using
Rect
you
define its edges using integers and using
RectF
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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: