euv_engine/renderer/enum.rs
1/// Defines how new pixels are composited with existing pixels on the canvas.
2///
3/// Maps directly to the CSS `globalCompositeOperation` property.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum BlendMode {
6 /// The source is drawn over the destination (default alpha blending).
7 #[default]
8 Normal,
9 /// The source color is multiplied with the destination, producing a darker result.
10 Multiply,
11 /// The source and destination are inverted, multiplied, then inverted again.
12 Screen,
13 /// The source and destination colors are added together, clamped to maximum brightness.
14 Lighter,
15 /// Combines `Multiply` and `Screen` based on the destination color.
16 Overlay,
17 /// Keeps the darker of the source and destination per channel.
18 Darken,
19 /// Keeps the lighter of the source and destination per channel.
20 Lighten,
21 /// Dodges the destination color brightening it based on the source.
22 ColorDodge,
23 /// Burns the destination color darkening it based on the source.
24 ColorBurn,
25 /// A harsher version of `Overlay` using the source color as the filter.
26 HardLight,
27 /// A softer version of `Overlay` using the source color as the filter.
28 SoftLight,
29 /// Subtracts the darker color from the lighter color per channel.
30 Difference,
31 /// Similar to `Difference` but with lower contrast.
32 Exclusion,
33 /// Uses the hue of the source with the saturation and luminosity of the destination.
34 Hue,
35 /// Uses the saturation of the source with the hue and luminosity of the destination.
36 Saturation,
37 /// Uses the hue and saturation of the source with the luminosity of the destination.
38 Color,
39 /// Uses the luminosity of the source with the hue and saturation of the destination.
40 Luminosity,
41}