pub enum BlendMode {
Show 17 variants
Normal,
Compatible,
Multiply,
Screen,
Overlay,
Darken,
Lighten,
ColorDodge,
ColorBurn,
HardLight,
SoftLight,
Difference,
Exclusion,
Hue,
Saturation,
Color,
Luminosity,
}Expand description
A separable blend mode (ISO 32000-1 table 136).
An unrecognised /BM name is Normal, not an error.
Variants§
Normal
Paint the source over the backdrop.
Compatible
A synonym for Self::Normal kept for round-tripping.
Multiply
Multiply the two.
Screen
Multiply the complements.
Overlay
Multiply or screen depending on the backdrop.
Darken
Take the darker.
Lighten
Take the lighter.
ColorDodge
Brighten the backdrop to reflect the source.
ColorBurn
Darken the backdrop to reflect the source.
HardLight
Multiply or screen depending on the source.
SoftLight
Darken or lighten depending on the source.
Difference
The absolute difference.
Exclusion
A lower-contrast difference.
Hue
The source’s hue with the backdrop’s saturation and luminosity.
Saturation
The source’s saturation.
Color
The source’s hue and saturation.
Luminosity
The source’s luminosity.
Implementations§
Source§impl BlendMode
impl BlendMode
Sourcepub fn from_name(name: &[u8]) -> Self
pub fn from_name(name: &[u8]) -> Self
The mode a /BM name denotes, defaulting to Self::Normal.
Sourcepub fn needs_backdrop(self) -> bool
pub fn needs_backdrop(self) -> bool
Whether compositing in this mode needs the backdrop.
PDFium marks a holder as needing background alpha for any mode past
Multiply, which is what this reproduces.