withTransform

inline fun DrawScope.withTransform(transformBlock: DrawTransform.() -> Unit, drawBlock: DrawScope.() -> Unit)

Executes drawBlock with transformations applied in transformBlock, restoring the previous transform and clip state afterwards.