clipPath
Function
Common
inline fun DrawScope.clipPath(
path: Path,
clipOp: ClipOp = ClipOp.Intersect,
block: DrawScope.() -> Unit,
) = withTransform({ clipPath(path, clipOp) }, block)
Reduces the clip region to the intersection of the current clip and the given path. This method provides a callback to issue drawing commands within the region defined by the clipped path. After this method is invoked, this clip is no longer applied.
Parameters
path | Shape to clip drawing content within |
clipOp | Clipping operation to conduct on the given bounds, defaults to ClipOp.Intersect |
block | Lambda callback with this CanvasScope as a receiver scope to issue drawing commands within the provided clip |