public class ImageViewUtil
extends java.lang.Object
| Constructor and Description |
|---|
ImageViewUtil() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.Rect |
getBitmapRectCenterInside(float imageWidth,
float imageHeight,
float viewWidth,
float viewHeight)
Gets the rectangular position of a Bitmap if it were placed inside a View
with scale type set to
#CENTER_INSIDE. |
static android.graphics.RectF |
getBitmapRectFCenterInside(float imageWidth,
float imageHeight,
float viewWidth,
float viewHeight)
Gets the rectangular position of a Bitmap if it were placed inside a View
with scale type set to
#CENTER_INSIDE. |
@NonNull
public static android.graphics.Rect getBitmapRectCenterInside(float imageWidth,
float imageHeight,
float viewWidth,
float viewHeight)
#CENTER_INSIDE.imageWidth - the Bitmap's widthimageHeight - the Bitmap's heightviewWidth - the parent View's widthviewHeight - the parent View's height@NonNull
public static android.graphics.RectF getBitmapRectFCenterInside(float imageWidth,
float imageHeight,
float viewWidth,
float viewHeight)
#CENTER_INSIDE.imageWidth - the Bitmap's widthimageHeight - the Bitmap's heightviewWidth - the parent View's widthviewHeight - the parent View's height