# `<mask>`

[Canonical page](https://nothing.graphics/docs/format/reference/mask) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/mask.md)

Limit a drawable's assembled picture with one local source shape.



<!-- Generated by ncf/tools/reference/generate.mjs. -->

The nested shape supplies geometry, alpha or luminance coverage. The mask applies once in the owning drawable's coordinates. It occupies no paint slot.

## Syntax [#syntax]

### Limit a backdrop read to a rectangle [#limit-a-backdrop-read-to-a-rectangle]

The placement’s geometry mask bounds its effect in placement coordinates. At frame 1, (22, 16) is gray inside the mask and (29, 16) stays black outside it.

```xml
<mask type="geometry"><shape><rect anchor-u="0" anchor-v="0" width="12" height="12"/></shape></mask>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/backdrop/scopes.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/README.md#layer-effects)

## Usage context [#usage-context]

Allowed parents are [`<shape>`](https://nothing.graphics/docs/format/reference/shape), [`<group>`](https://nothing.graphics/docs/format/reference/group), [`<sequence>`](https://nothing.graphics/docs/format/reference/sequence).

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `type` [#type]

**Value** `geometry`, `alpha`, `luminance` · **Required** · **Keys** Held

Geometry uses the transformed filled region. Alpha uses rendered opacity. Luminance multiplies rendered alpha by weighted straight sRGB brightness.

## Children [#children]

| Elements                                                              | Cardinality  | Declared by | Role and source order                                                                                                                                                                                                |
| --------------------------------------------------------------------- | ------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<shape>`](https://nothing.graphics/docs/format/reference/shape)     | Exactly one  | `<mask>`    | A source shape with its own properties and tracks. The source participates only through the selected coverage rule.                                                                                                  |
| [`<animate>`](https://nothing.graphics/docs/format/reference/animate) | Zero or more | Animation   | A track targets one keyable property on this owner. For equal first-key times, the later track in document order wins. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation) |

## Specifications [#specifications]

* [Mask sources](https://nothing.graphics/docs/format/spec/graphics#mask-on-a-shape)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
