Enum tetra::graphics::BlendOperation
source · pub enum BlendOperation {
Add,
Subtract,
ReverseSubtract,
Min,
Max,
}
Expand description
Defines a formula for blending two color or alpha values.
Variants§
Add
Blends by adding the source and the destination together.
(srcValue * srcBlendFactor) + (dstValue * dstBlendFactor)
Subtract
Blends by subtracting the destination from the source.
(srcValue * srcBlendFactor) - (dstValue * dstBlendFactor)
ReverseSubtract
Blends by subtracting the source from the destination.
(dstValue * dstBlendFactor) - (srcValue * srcBlendFactor)
Min
Blends by picking the minimum of the source and destination.
min((srcValue * srcBlendFactor), (dstValue * dstBlendFactor))
Max
Blends by picking the maximum of the source and destination.
max((srcValue * srcBlendFactor), (dstValue * dstBlendFactor))
Trait Implementations§
source§impl Clone for BlendOperation
impl Clone for BlendOperation
source§fn clone(&self) -> BlendOperation
fn clone(&self) -> BlendOperation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BlendOperation
impl Debug for BlendOperation
source§impl PartialEq<BlendOperation> for BlendOperation
impl PartialEq<BlendOperation> for BlendOperation
source§fn eq(&self, other: &BlendOperation) -> bool
fn eq(&self, other: &BlendOperation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.