The Developer Preview for Android 11 is now available; test it out and share your feedback.

FixedScale

data class FixedScale : ScaleFit
kotlin.Any
   ↳ androidx.ui.graphics.FixedScale

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

Summary

Public constructors

<init>(value: Float)

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

Public methods

Float
scale(srcSize: PxSize, dstSize: PxSize)

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

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

Float

Public constructors

<init>

FixedScale(value: Float)

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

Public methods

scale

fun scale(
    srcSize: PxSize,
    dstSize: PxSize
): 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