# Drawable effects

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

Filter or mask a drawable or blur the picture behind it.



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

A source filter acts on the assembled drawable. A backdrop filter acts on earlier paint. A mask sets how much of the result contributes.

## Example [#example]

### Blur a group as a unit [#blur-a-group-as-a-unit]

Put a source `<filter>` directly under the group to blur its assembled contents. The filter isolates the Multiply shape even at frame 0, when sigma is zero, so both (20, 20) and (44, 20) are yellow. By frame 4, with sigma 4, the blur reaches the blue background at (20, 13).

```xml
<group blend-mode="pass-through">
  <filter><blur sigma="0"><animate attributeName="sigma" fill="freeze">
    <key frame="0" value="0" ease="linear"/><key frame="4" value="4"/>
  </animate></blur></filter>
  <shape blend-mode="multiply"><rect anchor-u="0" anchor-v="0" offset-x="8" offset-y="14" width="48" height="12"/><fill><paint><solid color="#FFFF00FF"/></paint></fill></shape>
</group>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/blending/source-filter.nothing)

## Usage context [#usage-context]

Trait `DrawableEffects` in the [scene format type model](https://nothing.graphics/docs/format/spec/type-model).

Related pages in this reference are [Drawable](https://nothing.graphics/docs/format/reference/drawable).

## Children [#children]

| Elements                                                                              | Cardinality           | Declared by      | Role and source order                                                                                                                                                                        |
| ------------------------------------------------------------------------------------- | --------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<filter>`](https://nothing.graphics/docs/format/reference/filter)                   | Optional, at most one | Drawable effects | Source-image operations on the assembled drawable. Independent of its position among siblings.                                                                                               |
| [`<backdrop-filter>`](https://nothing.graphics/docs/format/reference/backdrop-filter) | Optional, at most one | Drawable effects | Blur the accumulated picture at this drawable's paint position. Independent of its position among siblings. [Backdrop blur](https://nothing.graphics/docs/format/spec/filters#backdrop-blur) |
| [`<mask>`](https://nothing.graphics/docs/format/reference/mask)                       | Optional, at most one | Drawable effects | Coverage from one source shape. Independent of its position among siblings. [Mask sources](https://nothing.graphics/docs/format/spec/graphics#mask-on-a-shape)                               |

## Specifications [#specifications]

* [Filters and shadows](https://nothing.graphics/docs/format/spec/filters)
* [Backdrop blur](https://nothing.graphics/docs/format/spec/filters#backdrop-blur)
* [Mask sources](https://nothing.graphics/docs/format/spec/graphics#mask-on-a-shape)
