Enum tetra::graphics::BlendMode [−][src]
pub enum BlendMode {
Alpha(BlendAlphaMode),
Add(BlendAlphaMode),
Subtract(BlendAlphaMode),
Multiply,
}
Expand description
The different ways of blending colors.
The active blend mode will be used to determine how drawn content will be blended
with the screen (or with a Canvas
, if one is active).
For modes where the alpha component of the color can affect the output, an
additional BlendAlphaMode
parameter is provided, which determines if
the colour should be multiplied by its alpha before blending.
Variants
Alpha(BlendAlphaMode)
The alpha of the drawn content will determine its opacity.
This is the default behaviour.
Tuple Fields of Alpha
Add(BlendAlphaMode)
The pixel colors of the drawn content will be added to the pixel colors already in the target. The target’s alpha will not be affected.
Tuple Fields of Add
Subtract(BlendAlphaMode)
The pixel colors of the drawn content will be subtracted from the pixel colors already in the target. The target’s alpha will not be affected.
Tuple Fields of Subtract
The pixel colors of the drawn content will be multiplied with the pixel colors already in the target. The alpha component will also be multiplied.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BlendMode
impl UnwindSafe for BlendMode
Blanket Implementations
Mutably borrows from an owned value. Read more