Nothing

Choose a paint scope, mask, or filter

Control which pixels an operation reads and where its result can appear.

Read as Markdown

Read siblings in drawing order, with later drawables painting over earlier ones. A group collects its children so a single transform, mask or opacity can affect their combined picture. A shape assembles its own fill and strokes with any attached drawables. Use a mask for coverage, a source filter for the drawable’s picture, and a backdrop filter for earlier painting behind it. Compositing and coverage

To control…Put this on the drawable
The silhouette of a windowA mask type="geometry" with one source shape. The source’s geometry defines coverage, including holes.
A soft or brightness-dependent matteAn alpha mask for the source picture’s alpha, or a luminance mask for its alpha-weighted brightness. An opaque black source gives full coverage in an alpha mask and zero in a luminance mask.
The pixels made by the drawable itselfA filter. Its operations read in order, so a blur after a drop shadow sees the source and the shadow.
The picture already painted behind the drawableA backdrop-filter containing one blur. A shape supplies its geometry as the effect’s aperture. A group or sequence needs an explicit mask.

To keep a window fixed while its picture pans, mask the enclosing group and translate the child sequence. A mask refers to its owner regardless of its position among the owner’s children. Moving a drawable into the masked group changes its membership, so that drawable now passes through the same window. The moving-card walkthrough shows the exact pixels that change when the progress line joins the masked group. Mask source rules

Blur the background and cast a separate shadow

In the frosted panel, the vertical white stripe is painted first. The panel’s backdrop blur spreads light from that stripe under the panel, including into the formerly black pixel at (25, 14). The source drop shadow extends beyond the panel to (51, 16). The yellow stripe at (28, 14) stays sharp because it paints after the panel.

Set only the backdrop sigma from 3 to 0. The stripe edge under the tint becomes sharp and the red shadow at (51, 16) keeps the same value. Edit only the shadow’s dx to move it while the backdrop blur stays in place. Backdrop replacement rule · Layer effect observations

Find the backdrop for a blend

A normal shape assembles its own source on transparency. An unfiltered pass-through group can expose the enclosing backdrop to its children, so Multiply can see earlier layers. A nonempty source filter creates an isolated source, even when its blur has sigma zero. The source-filter case puts a yellow Multiply mark over a blue plate in both scopes. On frame 0 the passing mark turns black at (20, 4), while the isolated mark is still yellow at (20, 20). Removing the isolated group’s blur operation gives it access to the enclosing plate again. Drawable blending observations

Examples

Download the complete .nothing source · Source on GitHub

Rendered with ncf-preview at 64 × 32.

A sharp white stripe diffuses under the tinted panel. A thin red shadow extends to the panel’s right, and a yellow stripe paints sharply above the result.
Frame 0 · Frosted panelA sharp white stripe diffuses under the tinted panel. A thin red shadow extends to the panel’s right, and a yellow stripe paints sharply above the result.
XML source
<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>

On this page