roundedCorners

open fun roundedCorners(    pool: BitmapPool,     inBitmap: Bitmap,     width: Int,     height: Int,     roundingRadius: Int): Bitmap

Creates a bitmap from a source bitmap and rounds the corners.

Return

a Bitmap similar to inBitmap but with rounded corners.

Deprecated

Width and height are unused and ignored. Use roundedCorners instead.

Parameters

inBitmap

the source bitmap to use as a basis for the created bitmap.

width

the width of the generated bitmap.

height

the height of the generated bitmap.

roundingRadius

the corner radius to be applied (in device-specific pixels).

Throws

if roundingRadius, width or height is 0 or less.


open fun roundedCorners(    pool: BitmapPool,     inBitmap: Bitmap,     roundingRadius: Int): Bitmap

Creates a bitmap from a source bitmap and rounds the corners.

This method does NOT resize the given Bitmap, it only rounds it's corners. To both resize and round the corners of an image, consider transform and/or .

Return

a Bitmap similar to inBitmap but with rounded corners.

Parameters

inBitmap

the source bitmap to use as a basis for the created bitmap.

roundingRadius

the corner radius to be applied (in device-specific pixels).

Throws

if roundingRadius, width or height is 0 or less.


open fun roundedCorners(    pool: BitmapPool,     inBitmap: Bitmap,     topLeft: Float,     topRight: Float,     bottomRight: Float,     bottomLeft: Float): Bitmap

Creates a bitmap from a source bitmap and rounds the corners, applying a potentially different [X, Y] radius to each corner.

This method does NOT resize the given Bitmap, it only rounds it's corners. To both resize and round the corners of an image, consider transform and/or .

Return

a Bitmap similar to inBitmap but with rounded corners.

Parameters

inBitmap

the source bitmap to use as a basis for the created bitmap.

topLeft

top-left radius

topRight

top-right radius

bottomRight

bottom-right radius

bottomLeft

bottom-left radius