#[repr(u8)]pub enum TintMode {
AlphaMask = 0,
Multiply = 1,
}Expand description
How tint color is applied to an image.
Variants§
AlphaMask = 0
Alpha-mask tinting: tint_premul * source.alpha.
The source image’s alpha channel is used as a coverage mask, and the result is filled with the premultiplied tint color. This is the standard approach for glyph / monochrome image tinting.
Multiply = 1
Component-wise multiply: source * tint.
Each channel of the source pixel is multiplied by the corresponding channel of the tint color. This works well for full-color images.
Implementations§
Trait Implementations§
impl Copy for TintMode
impl Eq for TintMode
impl StructuralPartialEq for TintMode
Auto Trait Implementations§
impl Freeze for TintMode
impl RefUnwindSafe for TintMode
impl Send for TintMode
impl Sync for TintMode
impl Unpin for TintMode
impl UnsafeUnpin for TintMode
impl UnwindSafe for TintMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more