The IlvComposeFilter Class
The
IlvComposeFilter class lets you perform the combination of the two input images pixel-wise in image space using one of the Porter-Duff compositing operations:
over,
in,
atop,
out,
xor. Additionally, a component-wise arithmetic operation (with the result clamped between [0..1]) can be applied. You have a choice of these six operators for the compositing, shown in
Compositing Operators.
The resulting color is given by the formula:
Cresult = Fa * Ca + Fb * Cb
where:
Ca is the color from the first image, and
Cb is the color from the second image.
In the table,
Aa is the alpha value from the first image and
Ab is the alpha value from the second image.
Compositing Operators
Operator | Operation |
over | Fa = 1, Fb = 1 - Aa |
in | Fa = Ab, Fb = 0 |
out | Fa = 1 - Ab, Fb = 0 |
atop | Fa = Ab, Fb = 1 - Aa |
xor | 1 - Ab, Fb = a - Aa |
arithmetic | Cresult = k1 * Ca * Cb + k2 * Ca + k3 * Ca * Cb + k4 |
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.