pub enum BlendMode {
Show 13 variants
Clear,
Source,
Destination,
SourceOver,
DestinationOver,
SourceIn,
DestinationIn,
SourceOut,
DestinationOut,
SourceAtop,
DestinationAtop,
Xor,
Plus,
}Expand description
Supported blend modes by this crate.
All modes operate in straight alpha. See
F32x4Rgba::premultiply for premultiplied support.
§Overflow
Plus can produce channel values > 1.0. Call
clamp() on the result when using Plus.
Variants§
Clear
Destination pixels covered by the source pixels are cleared.
Source
Source pixels are copied to the destination.
Destination
Destination pixels are copied to the source.
SourceOver
Source pixels are copied to the destination, ignoring the alpha channel.
DestinationOver
Destination pixels are copied to the source, ignoring the alpha channel.
SourceIn
Source pixels are copied to the destination, only where the destination is opaque.
DestinationIn
Destination pixels are copied to the source, only where the source is opaque.
SourceOut
Source pixels are copied to the destination, only where the source is opaque.
DestinationOut
Destination pixels are copied to the source, only where the destination is opaque.
SourceAtop
Source pixels are copied to the destination, where both source and destination are opaque.
DestinationAtop
Destination pixels are copied to the source, where both source and destination are opaque.
Xor
Source pixels are blended with the destination using the source’s alpha channel.
Plus
Source pixels are added to the destination.
Note: can produce channel values > 1.0. Call
clamp() on the result when clamping is needed.