push_clip_mask
Mojo function 🡭
push_clip_mask
fn def push_clip_mask(mut canvas: Canvas, mask: Mask, x: Int = Int(0), y: Int = Int(0))Restrict subsequent drawing to mask, its top-left corner at (x, y) – push_clip_path for a coverage built elsewhere. Pixels the mask does not reach are clipped out. Nests with the clip paths and rectangles already pushed, multiplying into the current mask, and is removed by pop_clip_path.
Args:
- canvas (
Canvas): Canvas whose clip stack the mask joins. - mask (
Mask): Coverage that stays drawable. - x (
Int): Canvas column of the mask’s left edge. - y (
Int): Canvas row of the mask’s top edge.