@NonNull static fun generateCenteredRect(output: MultiRect, imageWidth: double, imageHeight: double, bounds: MultiRect): MultiRect
Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to ImageView.ScaleType.
imageWidth
- double: the Bitmap's width
imageHeight
- double: the Bitmap's height
bounds
- MultiRect: the parent View's bounds
Return
MultiRect: the rectangular position of the Bitmap
@NonNull static fun generateCenteredRect(imageWidth: double, imageHeight: double, bounds: MultiRect): MultiRect
Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to ImageView.ScaleType.
imageWidth
- double: the Bitmap's width
imageHeight
- double: the Bitmap's height
bounds
- MultiRect: the parent View's bounds
Return
MultiRect: the rectangular position of the Bitmap
@NonNull static fun generateCenteredRect(imageWidth: double, imageHeight: double, viewWidth: double, viewHeight: double): MultiRect
Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to ImageView.ScaleType.
imageWidth
- double: the Bitmap's width
imageHeight
- double: the Bitmap's height
viewWidth
- double: the parent View's width
viewHeight
- double: the parent View's height
Return
MultiRect: the rectangular position of the Bitmap
@NonNull static fun generateCenteredRect(output: MultiRect, imageWidth: double, imageHeight: double, viewWidth: double, viewHeight: double): MultiRect
Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to ImageView.ScaleType.
imageWidth
- double: the Bitmap's width
imageHeight
- double: the Bitmap's height
viewWidth
- double: the parent View's width
viewHeight
- double: the parent View's height
Return
MultiRect: the rectangular position of the Bitmap
@NonNull static fun generateCenteredRect(output: MultiRect, imageWidth: double, imageHeight: double, viewWidth: double, viewHeight: double, fitInside: boolean): MultiRect
Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to ImageView.ScaleType.
imageWidth
- double: the Bitmap's width
imageHeight
- double: the Bitmap's height
viewWidth
- double: the parent View's width
viewHeight
- double: the parent View's height
Return
MultiRect: the rectangular position of the Bitmap