getRotatedDrawable

fun getRotatedDrawable(drawable: Drawable, rotationDegrees: Float = -90f): Drawable

Rotates a drawable while preserving its aspect ratio.