generateCenteredRect

Gets the rectangular position of a Bitmap if it were placed inside a View with scale type set to .

Return

the rectangular position of the Bitmap

Parameters

bounds

the parent View's bounds

imageHeight

the Bitmap's height

imageWidth

the Bitmap's width

open 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 .

Return

the rectangular position of the Bitmap

Parameters

bounds

the parent View's bounds

imageHeight

the Bitmap's height

imageWidth

the Bitmap's width

open 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 .

Return

the rectangular position of the Bitmap

Parameters

imageHeight

the Bitmap's height

imageWidth

the Bitmap's width

viewHeight

the parent View's height

viewWidth

the parent View's width

open 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 .

Return

the rectangular position of the Bitmap

Parameters

imageHeight

the Bitmap's height

imageWidth

the Bitmap's width

viewHeight

the parent View's height

viewWidth

the parent View's width

open 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 .

Return

the rectangular position of the Bitmap

Parameters

imageHeight

the Bitmap's height

imageWidth

the Bitmap's width

viewHeight

the parent View's height

viewWidth

the parent View's width

open fun generateCenteredRect(output: MultiRect, imageWidth: Double, imageHeight: Double, viewWidth: Double, viewHeight: Double, fitInside: Boolean): MultiRect