🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

ContentScale

Scaling to be used when an element is smaller than its available bounds.

Source set: Android
public class ContentScale(private val value: Int)

Scaling to be used when an element is smaller than its available bounds. Mainly used by Image to dictate how the image should be drawn within the Image element's bounding box.

Members

Companion

Source set: Android
public companion object

Properties

Crop

Source set: Android
public val Crop: ContentScale = ContentScale(0)

Scale the source uniformly (maintaining the source's aspect ratio) so that both dimensions (width and height) of the source will be equal to or larger than the corresponding dimension of the destination.

Fit

Source set: Android
public val Fit: ContentScale = ContentScale(1)

Scale the source uniformly (maintaining the source's aspect ratio) so that both dimensions (width and height) of the source will be equal to or less than the corresponding dimension of the destination

FillBounds

Source set: Android
public val FillBounds: ContentScale = ContentScale(2)

Scale horizontal and vertically non-uniformly to fill the destination bounds.

Content updated: