Set Clipping Mask
photopea_set_clipping_maskClips a layer to the layer directly below so it shows only where that layer has pixels; set enabled to false to release the clipping mask.
Instructions
Clip a layer to the layer directly below it, so it only shows where that layer has pixels (e.g. a photo or texture confined to a text or shape). Set enabled to false to release it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Layer name (string) or index (number) | |
| enabled | No | true clips the layer to the one below, false releases it |