public final class Utils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SECOND_IN_NANOS |
| Modifier and Type | Method and Description |
|---|---|
static void |
applyTrimPathIfNeeded(android.graphics.Path path,
float startValue,
float endValue,
float offsetValue) |
static void |
applyTrimPathIfNeeded(android.graphics.Path path,
TrimPathContent trimPath) |
static void |
closeQuietly(java.io.Closeable closeable) |
static android.graphics.Path |
createPath(android.graphics.PointF startPoint,
android.graphics.PointF endPoint,
android.graphics.PointF cp1,
android.graphics.PointF cp2) |
static float |
dpScale() |
static float |
getAnimationScale(android.content.Context context) |
static float |
getScale(android.graphics.Matrix matrix) |
static int |
hashFor(float a,
float b,
float c,
float d) |
static boolean |
hasZeroScaleAxis(android.graphics.Matrix matrix) |
static boolean |
isAtLeastVersion(int major,
int minor,
int patch,
int minMajor,
int minMinor,
int minPatch) |
static android.graphics.Bitmap |
renderPath(android.graphics.Path path)
For testing purposes only.
|
static android.graphics.Bitmap |
resizeBitmapIfNeeded(android.graphics.Bitmap bitmap,
int width,
int height)
Resize the bitmap to exactly the same size as the specified dimension, changing the aspect ratio if needed.
|
public static final int SECOND_IN_NANOS
public static android.graphics.Path createPath(android.graphics.PointF startPoint,
android.graphics.PointF endPoint,
android.graphics.PointF cp1,
android.graphics.PointF cp2)
public static void closeQuietly(java.io.Closeable closeable)
public static float getScale(android.graphics.Matrix matrix)
public static boolean hasZeroScaleAxis(android.graphics.Matrix matrix)
public static void applyTrimPathIfNeeded(android.graphics.Path path,
TrimPathContent trimPath)
public static void applyTrimPathIfNeeded(android.graphics.Path path,
float startValue,
float endValue,
float offsetValue)
public static boolean isAtLeastVersion(int major,
int minor,
int patch,
int minMajor,
int minMinor,
int minPatch)
public static int hashFor(float a,
float b,
float c,
float d)
public static float dpScale()
public static float getAnimationScale(android.content.Context context)
public static android.graphics.Bitmap resizeBitmapIfNeeded(android.graphics.Bitmap bitmap,
int width,
int height)
public static android.graphics.Bitmap renderPath(android.graphics.Path path)