resizeWithContentScale

Functions summary

Modifier
@UnstableApi
@Composable
Modifier.resizeWithContentScale(
    contentScale: ContentScale,
    sourceSizeDp: Size?,
    density: Density
)

This function is deprecated. Use the overload that takes aspectRatio instead.

Functions

Modifier.resizeWithContentScale

@UnstableApi
@Composable
fun Modifier.resizeWithContentScale(
    contentScale: ContentScale,
    sourceSizeDp: Size?,
    density: Density = LocalDensity.current
): Modifier

Attempts to size the original content rectangle to be inscribed into a destination by applying a specified ContentScale type.

Use the overload that takes aspectRatio instead.

Parameters
contentScale: ContentScale

The ContentScale to apply to the content.

sourceSizeDp: Size?

The size of the content in DP.

density: Density = LocalDensity.current

The Density to use for conversions.