drawable

fun drawable(drawable: Drawable, tintDrawable: Boolean = true, keepAspectRatio: Boolean = false, otherShape: Shape? = Rectangle): Shape

Creates a Shape out of a Drawable.

Parameters

drawable

the Drawable that will be used as a shape.

keepAspectRatio

whether to keep the drawable’s aspect ratio, based on its intrinsic size.

otherShape

used to fill the remaining space if the drawable doesn’t fill the entire bounds.