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
ScaleFactor
computeScaleFactor(srcSize: Size, dstSize: Size)

Computes the scale factor to apply to the horizontal and vertical axes independently of one another to fit the source appropriately with the given destination

Inherited functions
Properties
Float

Public constructors

<init>

FixedScale(value: Float)

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

Public methods

computeScaleFactor

fun computeScaleFactor(
    srcSize: Size,
    dstSize: Size
): ScaleFactor

Computes the scale factor to apply to the horizontal and vertical axes independently of one another to fit the source appropriately with the given destination

Properties

value

val value: Float