feComposite: Combine images using Porter-Duff operations.

View source: R/filters.R

feCompositeR Documentation

Combine images using Porter-Duff operations.

Description

This filter performs the combination of the two input images pixel-wise in image space using one of the Porter-Duff compositing operations.

The arithmetic operation is useful for combining the output from the feDiffuseLighting and feSpecularLighting filter effects with texture data. It is also useful for implementing dissolve.

Usage

feComposite(input1 = NA, input2 = NA,
            operator = c("over", "in", "out", "atop",
                         "xor", "arithmetic"),
            k1 = 0, k2 = 0, k3 = 0, k4 = 0, ...)

Arguments

input1

Identifies an input for this filter primtive. See filterInputs.

input2

Identfies a second input for this filter primitive. See filterInputs.

operator

The compositing operation that is to be performed. All of the operator types except "arithmetic" match the corresponding operation as described in the referenced Porter-Duff text. The arithmetic operator is described in the referenced SVG specification.

k1

A numeric value. Only applicable if operator is "arithmetic".

k2

A numeric value. Only applicable if operator is "arithmetic".

k3

A numeric value. Only applicable if operator is "arithmetic".

k4

A numeric value. Only applicable if operator is "arithmetic".

...

Further arguments to be passed onto fe.

Details

For more information about this primitive, consult the reference to the SVG specification.

Value

An fe.composite object.

Author(s)

Simon Potter

References

https://www.w3.org/TR/SVG/filters.html#feCompositeElement

Compositing Digital Images, T. Porter and T. Duff. SIGGRAPH '84 Conference Proceedings, Association for Computing Machinery, Volume 18, Number 3, July 1984.

See Also

filterEffect, fe.


gridSVG documentation built on March 31, 2023, 11:17 p.m.