pub enum CompositeOperator {
Over,
In,
Out,
Atop,
Xor,
Arithmetic {
k1: f32,
k2: f32,
k3: f32,
k4: f32,
},
}Expand description
Composite operators for combining filter inputs.
These are the Porter-Duff compositing operators used to combine two images. Each operator defines how the source (input 1) and destination (input 2) are combined based on their color and alpha values.
Variants§
Over
Source over destination (standard alpha blending).
The source is composited over the destination. This is the most common blending mode where source alpha determines visibility.
In
Source in destination (intersection).
The source is only visible where the destination is opaque.
Result alpha = source_alpha × dest_alpha.
Out
Source out destination (subtract).
The source is only visible where the destination is transparent. Useful for masking/cutting out regions.
Atop
Source atop destination.
Source is composited over destination, but only where destination is opaque.
Xor
Source XOR destination (exclusive or).
Shows source where destination is transparent and vice versa, but not where both are opaque.
Arithmetic
Arithmetic combination with custom coefficients.
Custom linear combination: result = k1srcdst + k2src + k3dst + k4. Allows creating custom compositing operations beyond the standard Porter-Duff set.
Trait Implementations§
Source§impl Clone for CompositeOperator
impl Clone for CompositeOperator
Source§fn clone(&self) -> CompositeOperator
fn clone(&self) -> CompositeOperator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompositeOperator
impl Debug for CompositeOperator
Source§impl PartialEq for CompositeOperator
impl PartialEq for CompositeOperator
Source§fn eq(&self, other: &CompositeOperator) -> bool
fn eq(&self, other: &CompositeOperator) -> bool
self and other values to be equal, and is used by ==.