{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

FixedScale

public final class FixedScale implements ContentScale


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

Summary

Public constructors

FixedScale(float value)

Public methods

@NonNull ScaleFactor
computeScaleFactor(@NonNull Size srcSize, @NonNull Size dstSize)

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

final float

Public constructors

FixedScale

public FixedScale(float value)

Public methods

computeScaleFactor

public @NonNull ScaleFactor computeScaleFactor(@NonNull Size srcSize, @NonNull Size dstSize)

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

getValue

public final float getValue()