create

fun create(drawable: Drawable?, scaleType: ImageView.ScaleType = ScaleType.FIT_CENTER, useIntrinsicSize: Boolean = true, widthPx: Int? = null, heightPx: Int? = null, style: Style? = null): PrimitiveImage

Java-compatible factory method that accepts pixel values for dimensions. Use this method when calling from Java code with pixel values.

Parameters

drawable

The Drawable to render.

scaleType

The ScaleType to scale or transform the drawable.

useIntrinsicSize

Whether to use the intrinsic size of the drawable.

widthPx

Width in pixels, or null to not set.

heightPx

Height in pixels, or null to not set.

style

Additional style to apply, or null for no additional style.