<filter>
Process an assembled drawable through ordered image operations.
Examples
Download the complete .nothing source · Source on GitHub
Rendered with ncf-preview at 64 × 32.

<scene width="64" height="32" frame-rate="24" background="#000000FF">
<shape>
<rect anchor-u="0" anchor-v="0" offset-x="20" width="4" height="32"/>
<fill><paint><solid color="#FFFFFFFF"/></paint></fill>
</shape>
<shape>
<rect anchor-u="0" anchor-v="0" offset-x="10" offset-y="6" width="40" height="18" corner-radius="3"/>
<backdrop-filter><blur sigma="3"/></backdrop-filter>
<fill><paint><solid color="#3080C030"/></paint></fill>
<filter><drop-shadow dx="4" dy="2" sigma="0" color="#FF0000FF"/></filter>
</shape>
<shape>
<rect anchor-u="0" anchor-v="0" offset-x="28" width="2" height="32"/>
<fill><paint><solid color="#FFFF00FF"/></paint></fill>
</shape>
</scene>A source filter processes the owner's assembled local picture, before its mask and opacity. A nonempty filter isolates its input even at a sample that has an identity blur.
Syntax
Shade the source, then cast its shadow
The inner shadow tints the linked image while preserving alpha. The drop shadow then uses that alpha. The cast stays at alpha 128 at (160, 71) throughout the inner-offset animation.
<filter>
<inner-shadow dx="0" dy="0" sigma="0" color="#FF0000FF">
<animate attributeName="dx" fill="freeze">
<key frame="0" value="0" ease="linear"/>
<key frame="24" value="12"/>
</animate>
</inner-shadow>
<drop-shadow dx="0" dy="44" sigma="0" color="#F9AB52FF"/>
</filter>Complete .nothing source · Sample checks
Usage context
Allowed parents are <shape>, <group>, <sequence>.
Children
| Elements | Cardinality | Declared by | Role and source order |
|---|---|---|---|
<blur>, <drop-shadow>, <inner-shadow> | Zero or more | <filter> | Operations may repeat. An empty list returns its input. Document order. Each operation receives the preceding operation's entire result. Source filter operations |