« SVG Attribute reference home
The in attribute identifies input for the given filter primitive.
The value can be either one of six keywords define below or can be a string which matches a previous result attribute value within the same <filter> element. If no value is provided and this is the first filter primitive, then this filter primitive will use SourceGraphic as its input. If no value is provided and this is a subsequent filter primitive, then this filter primitive will use the result from the previous filter primitive as its input.
If the value for result appears multiple times within a given <filter> element, then a reference to that result will use the closest preceding filter primitive with the given value for attribute result.
Usage context
| Categories | None |
|---|---|
| Value | SourceGraphic | SourceAlpha | BackgroundImage | BackgroundAlpha | FillPaint | StrokePaint | <filter-primitive-reference> |
| Animatable | Yes |
| Normative document | SVG 1.1 (2nd Edition) |
- SourceGraphic
-
This keyword represents the graphics elements that were the original input into the
<filter>element. - SourceAlpha
-
This keyword represents the graphics elements that were the original input into the
<filter>element.SourceAlphahas all of the same rules asSourceGraphicexcept that only the alpha channel is used. - BackgroundImage
-
This keyword represents an image snapshot of the SVG document under the filter region at the time that the
<filter>element was invoked. - BackgroundAlpha
-
Same as
BackgroundImageexcept only the alpha channel is used. - FillPaint
-
This keyword represents the value of the
fillproperty on the target element for the filter effect. In many cases, theFillPaintis opaque everywhere, but it might not be the case if a shape is paint with a gradient or pattern which itself includes transparent or semi-transparent parts. - StrokePaint
-
This keyword represents the value of the
strokeproperty on the target element for the filter effect. In many cases, theStrokePaintis opaque everywhere, but it might not be the case if a shape is paint with a gradient or pattern which itself includes transparent or semi-transparent parts.
Example
Elements
The following elements can use the in attribute