public abstract class RectFUtils
extends java.lang.Object
RectF| Constructor and Description |
|---|
RectFUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.RectF |
applyInsets(android.graphics.RectF rect,
Insets insets)
Calculates a new
RectF by applying insets to rect. |
static boolean |
areIdentical(android.graphics.RectF r1,
android.graphics.RectF r2)
Determine if two
RectF instances are equal. |
static android.graphics.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 will
be passed into the RectF constructor such that RectF.left <= RectF.right and
RectF.top <= RectF.bottom.
|
public static boolean areIdentical(android.graphics.RectF r1,
android.graphics.RectF r2)
RectF instances are equal. Must be used in place
of 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-beanr1 - May not be nullr2 - May not be nullpublic static android.graphics.RectF applyInsets(android.graphics.RectF rect,
Insets insets)
RectF by applying insets to rect.rect - insets - RectF created as a result of applying insets, or the passed in
instance, if the insets were null.public static android.graphics.RectF createFromEdges(float w1,
float h1,
float w2,
float h2)
w1 - width1h1 - height1w2 - width2h2 - height2