clipRect
Intersects the current clip with a rectangle defined by topLeft and size.
Parameters
topLeft
coordinates of the top-left corner.
size
dimensions of the clip rectangle.
block
the drawing commands executed with the clipped region.
inline fun DrawScope.clipRect(x: Float = 0.0f, y: Float = 0.0f, width: Float = size.width.toFloat() - x, height: Float = size.height.toFloat() - y, block: DrawScope.() -> Unit)
Intersects the clip with a rectangle defined by x, y, width, height for the duration of block.