Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

scale

Scale the contents of the composable by the following scale factors along the horizontal and vertical axis respectively.

ScaleNonUniformSample

@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun ScaleNonUniformSample() {
    RemoteBox(RemoteModifier.scale(2f.rf, 3f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}

ScaleUniformSample

@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun ScaleUniformSample() {
    RemoteBox(RemoteModifier.scale(2f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}

Last updated: