Google is committed to advancing racial equity for Black communities. See how.

FixedScale

@Immutable data class FixedScale : ContentScale
kotlin.Any
   ↳ androidx.compose.ui.layout.FixedScale

ContentScale implementation that always scales the dimension by the provided fixed floating point value

Summary

Public constructors
<init>(value: Float)

ContentScale implementation that always scales the dimension by the provided fixed floating point value

Public methods
Float
scale(srcSize: Size, dstSize: Size)

Computes the scale factor to apply to both dimensions in order to fit the source appropriately with the given destination size

Properties
Float

Public constructors

<init>

FixedScale(value: Float)

ContentScale implementation that always scales the dimension by the provided fixed floating point value

Public methods

scale

fun scale(
    srcSize: Size,
    dstSize: Size
): Float

Computes the scale factor to apply to both dimensions in order to fit the source appropriately with the given destination size

Properties

value

val value: Float