core-ktx / androidx.graphics / android.graphics.Canvas / withScale

withScale

inline fun Canvas.withScale(x: Float = 1.0f, y: Float = 1.0f, pivotX: Float = 0.0f, pivotY: Float = 0.0f, block: Canvas.() -> Unit): Unit

Wrap the specified block in calls to Canvas.save/Canvas.scale and Canvas.restoreToCount.