clipRect

abstract fun clipRect(x: Float, y: Float, width: Float, height: Float)

Constrains all subsequent drawing to the given rectangle. Effective until the next restoreState call. Wrap calls in saveState / restoreState to scope clipping to a region of code.