# androidx.compose.ui.graphics.painter

Common/All

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/BitmapPainter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation used to draw an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` into the provided canvas This implementation can handle applying alpha and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter` to it's drawn result | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/BrushPainter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation used to fill the provided bounds with the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/ColorPainter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation used to fill the provided bounds with the specified color | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` | Abstraction for something that can be drawn. | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/BitmapPainter` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)( image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap, srcOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset, srcSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, filterQuality: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality )` `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation used to draw an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` into the provided canvas This implementation can handle applying alpha and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter` to it's drawn result | Cmn |

## Top-level functions

### BitmapPainter

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/painter/BitmapPainter.kt+function:BitmapPainter) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun BitmapPainter(
    image: ImageBitmap,
    srcOffset: IntOffset = IntOffset.Zero,
    srcSize: IntSize = IntSize(image.width, image.height),
    filterQuality: FilterQuality = FilterQuality.Low
): BitmapPainter
```

`https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter` implementation used to draw an `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` into the provided canvas This implementation can handle applying alpha and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter` to it's drawn result

| Parameters |
|---|---|
| `image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` to draw |
| `srcOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset = IntOffset.Zero` | Optional offset relative to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)` used to draw a subsection of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap`. By default this uses the origin of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)` |
| `srcSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize = IntSize(image.width, image.height)` | Optional dimensions representing size of the subsection of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)` to draw Both the offset and size must have the following requirements: 1. Left and top bounds must be greater than or equal to zero 2. Source size must be greater than zero 3. Source size must be less than or equal to the dimensions of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)` |
| `filterQuality: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality = FilterQuality.Low` | Sampling algorithm applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/package-summary#BitmapPainter(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.graphics.FilterQuality)` when it is scaled and drawn into the destination. The default is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality#Low()` which scales using a bilinear sampling algorithm |