Illustration
A composable that lays out and draws a given ImageBitmap. This will attempt to size the composable according to the ImageBitmap's given width and height. However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background). Any unspecified dimension will leverage the ImageBitmap's size as a minimum constraint.
Parameters
The ImageBitmap to draw
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
Optional alignment parameter used to place the ImageBitmap in the given bounds defined by the width and height
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the ImageBitmap
Optional opacity to be applied to the ImageBitmap when it is rendered onscreen
Optional ColorFilter to apply for the ImageBitmap when it is rendered onscreen
Sampling algorithm applied to the bitmap when it is scaled and drawn into the destination. The default is FilterQuality.Low which scales using a bilinear sampling algorithm
A composable that lays out and draws a given ImageVector. This will attempt to size the composable according to the ImageVector's given width and height. However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background). Any unspecified dimension will leverage the ImageVector's size as a minimum constraint.
Parameters
The ImageVector to draw
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
Optional alignment parameter used to place the ImageVector in the given bounds defined by the width and height
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the ImageVector
Optional opacity to be applied to the ImageVector when it is rendered onscreen
Optional ColorFilter to apply for the ImageVector when it is rendered onscreen
Creates a composable that lays out and draws a given Painter. This will attempt to size the composable according to the Painter's intrinsic size. However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background)
NOTE a Painter might not have an intrinsic size, so if no LayoutModifier is provided as part of the Modifier chain this might size the Image composable to a width and height of zero and will not draw any content. This can happen for Painter implementations that always attempt to fill the bounds like ColorPainter
Parameters
to draw
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
Optional alignment parameter used to place the Painter in the given bounds defined by the width and height.
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the Painter
Optional colorFilter to apply for the Painter when it is rendered onscreen
Creates a composable that lays out and draws a given android.graphics.drawable.Drawable. This will attempt to size the composable according to the android.graphics.drawable.Drawable's intrinsic size. However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background)
Parameters
to draw
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
Optional alignment parameter used to place the Painter in the given bounds defined by the width and height.
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the Painter
Optional colorFilter to apply for the Painter when it is rendered onscreen
Creates a composable that lays out and draws a given SparkIcon. This will attempt to size the composable according to the SparkIcon's intrinsic size (should be already normalized but some exception may still exist). However, an optional Modifier parameter can be provided to adjust sizing or draw additional content (ex. background)
Parameters
to draw
text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar
Modifier used to adjust the layout algorithm or draw decoration content (ex. background)
Optional alignment parameter used to place the Painter in the given bounds defined by the width and height.
Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the Painter
Optional colorFilter to apply for the Painter when it is rendered onscreen