1# Drawable Painter 2 3[](https://search.maven.org/search?q=g:com.google.accompanist) 4 5A library which provides a way to use Android [drawables](https://developer.android.com/guide/topics/resources/drawable-resource) as Jetpack Compose [Painters](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/painter/Painter). 6 7This library attempts to support most Drawable configuration, as well as [Animatable](https://developer.android.com/reference/android/graphics/drawable/Animatable) drawables, such as [AnimatedVectorDrawable](https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable). 8 9## Usage 10 11``` kotlin 12@Composable 13fun DrawDrawable() { 14 val drawable = AppCompatResources.getDrawable(LocalContext.current, R.drawable.rectangle) 15 16 Image( 17 painter = rememberDrawablePainter(drawable = drawable), 18 contentDescription = "content description", 19 ) 20} 21``` 22 23## Download 24 25[](https://search.maven.org/search?q=g:com.google.accompanist) 26 27```groovy 28repositories { 29 mavenCentral() 30} 31 32dependencies { 33 implementation "com.google.accompanist:accompanist-drawablepainter:<version>" 34} 35``` 36 37Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. These are updated on every commit. 38 39[compose]: https://developer.android.com/jetpack/compose 40[snap]: https://oss.sonatype.org/content/repositories/snapshots/com/google/accompanist/accompanist-drawablepainter/ 41