v1.12.0 — Soft & gradient masks, multi-region clips
Bet 2 — Living shapes: soft & gradient masks, multi-region clips.
A clip mask no longer has to be one shape with a hard edge:
OGMultiRegionShape(com.solidkey.painpoints.shape) — combine several placed sub-shapes with a path op (union / intersect / difference / xor) into one clip: two portholes, or a diamond with a circular bite. A plain ComposeShape, so it drops into the existingclipShapeslot for image, GIF and video with zero consumer change. Outlines combined once per size, never per frame. Factoriesunion(...)/of(...);OGClipRegionplaces a sub-shape in a normalized 0..1 sub-rect.Modifier.ogSoftClip(shape, feather)+ogGradientMask(brush)(com.solidkey.painpoints.mask), surfaced onOGImageViewassoftEdge/maskBrush— feather a clip edge into a vignette, or fade content along a gradient, via one offscreenBlendMode.DstInpass (no blur, noRenderEffect, no Android API floor). Scoped to Compose-drawn content (photo/GIF); video stays hard-clipped.
Zero new dependencies. 13 new tests green on JVM + iOS. Purely additive — every existing call compiles unchanged.
implementation("se.solidkey:kmpmedia-lib:1.12.0")Docs: docs/SOFT_MASKS.md. See the README for live Android + iOS demo clips.