🌈 Create new beautiful Compose Gradients with our new wesite ->
Compose Modifier

paint

Paint the content using painter.

paint

Source set: Common
public fun Modifier.paint(
    painter: Painter,
    sizeToIntrinsics: Boolean = true,
    alignment: Alignment = Alignment.Center,
    contentScale: ContentScale = ContentScale.Inside,
    alpha: Float = DefaultAlpha,
    colorFilter: ColorFilter? = null,
): Modifier

Paint the content using painter.

Parameters

painter Painter to be drawn by this Modifier
sizeToIntrinsics true to size the element relative to Painter.intrinsicSize
alignment specifies alignment of the painter relative to content
contentScale strategy for scaling painter if its size does not match the content size
alpha opacity of painter
colorFilter optional ColorFilter to apply to painter