inset
inline fun DrawScope.inset(left: Float, top: Float, right: Float, bottom: Float, block: DrawScope.() -> Unit)
Insets the drawing area by left, top, right and bottom for the duration of block: the origin moves to (left, top), and DrawScope.size shrinks by the insets, rounded down. Nothing is clipped.
Throws
when the insets leave a negative width or height.
Insets every side of the drawing area by inset for the duration of block; see the four-sided inset.
inline fun DrawScope.inset(horizontal: Float = 0.0f, vertical: Float = 0.0f, block: DrawScope.() -> Unit)
Insets the left and right of the drawing area by horizontal and its top and bottom by vertical for the duration of block; see the four-sided inset.