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.
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.
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.
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
impl Copy for BlendMode
[src]
impl Eq for BlendMode
[src]
impl StructuralEq for BlendMode
[src]
impl StructuralPartialEq for BlendMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for BlendMode
impl Send for BlendMode
impl Sync for BlendMode
impl Unpin for BlendMode
impl UnwindSafe for BlendMode
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more