Function

clipPath

Reduces the clip region to the intersection of the current clip and the given path.

clipPath

Source set: Common
public inline fun DrawScope.clipPath(
    path: Path,
    clipOp: ClipOp = ClipOp.Intersect,
    block: DrawScope.() -> Unit,
): Unit

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
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: