|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
<feMergeNode> is a child of "<feMerge>" that names one layer to stack.
Each <feMergeNode> references a named filter result via its in attribute, and the parent <feMerge> layers them in document order, bottom to top.
On its own, <feMergeNode> does nothing — it only has meaning inside a <feMerge>. Think of <feMerge> as an ordered list and each <feMergeNode> as an entry in that list pointing at an earlier filter result.
The first <feMergeNode> in document order is painted first and ends up at the bottom of the final composite. Each subsequent <feMergeNode> is painted on top of the previous one using source-over compositing.
The most common place you will see <feMergeNode> is inside a drop-shadow filter. (This is the same example shown on the "<feMerge>" page — duplicated here so you can read either page stand-alone.)
The two <feMergeNode> children are the entire reason <feMerge> exists: the first one points at the blurred, offset shadow image built earlier in the filter chain; the second points at the unfiltered source. <feMerge> then paints them in that order, bottom to top, so the shape hides most of the shadow and only the offset portion shows.
| Attribute | Default | Description |
|---|---|---|
| in | previous | Name of the filter result to use as this layer. Either a result name defined earlier in the same <filter>, or one of the standard sources SourceGraphic, SourceAlpha, BackgroundImage, BackgroundAlpha, FillPaint, StrokePaint. |