-
public abstract class RectFUtilsConvenience methods for dealing with android.graphics.RectF
-
-
Method Summary
Modifier and Type Method Description static booleanareIdentical(RectF r1, RectF r2)Determine if two RectF instances are equal. static RectFapplyInsets(RectF rect, Insets insets)Calculates a new RectF by applying insets to rect. static RectFcreateFromEdges(float w1, float h1, float w2, float h2)Generates a RectF from two height and two width values; the h and w values willbe passed into the RectF constructor such that RectF.left <= RectF.right andRectF.top <= RectF.bottom. -
-
Method Detail
-
areIdentical
static boolean areIdentical(RectF r1, RectF r2)
Determine if two RectF instances are equal. Must be used in placeof default equality operation due to a bug that exists in older versions of Android:http://stackoverflow.com/questions/13517852/rectf-equals-fails-on-android-versions-below-jelly-bean
- Parameters:
r1- May not be nullr2- May not be null
-
applyInsets
static RectF applyInsets(RectF rect, Insets insets)
Calculates a new RectF by applying insets to rect.
-
createFromEdges
static RectF createFromEdges(float w1, float h1, float w2, float h2)
Generates a RectF from two height and two width values; the h and w values willbe passed into the RectF constructor such that RectF.left <= RectF.right andRectF.top <= RectF.bottom.
- Parameters:
w1- width1h1- height1w2- width2h2- height2
-
-
-
-