We need more traffic. Please use the social buttons above to spread the word!

## feComposite (SVG Filter Effect)

The composite filter effect uses the Porter-Duff algorithms to combine two sources based on their alpha channels. Since this is done by pixel, the alpha channel provides the shape of the source. If it is black then the shape is there. If it is white then the shape is not there.

When two shapes (A, B) are placed on top of each pixel can have four results: Both there, only A there, only B there or neither there. The five operators (over, in, out, atop, xor) decide which source is displayed based on the first three results. If neither is there then it is always transparent. A pixel's transparency determines the degree of inclusion or exclusion.

<feComposite>
 Attribute Comments in2 Provides a second input to the filter effect. Functions exactly like the common 'in' attribute. operator Specifies the compositing mode. See below. k1,k2,k3,k4 These four are used with 'arithmetic' operator. Default is 0.

The operators are: over, in, out, atop, xor and arithmetic. If you assemble a sentence you should have a good idea what the first 5 operators do. See the examples below.

 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ``` ```                                           ...                 ...     ...   ```
Example 1. Composited images. The bird is A (in) and the circular symbol is B (in2). (Download)

The arithmetic operator allows input into the following formula: result = k1*A*B + k2*A + k3*B + k4.