pub struct LayerShaderMask {
pub shader: MaskShader,
pub blend: BlendMode,
}Expand description
A colour blended over a subtree — the ShaderMask widget’s payload.
Fields§
§shader: MaskShaderThe colour, as a fade over the masked box.
blend: BlendModeHow that colour meets the subtree. BlendMode::Modulate — the default —
multiplies, so the shader’s alpha becomes the subtree’s transparency, which
is what makes a mask a mask.
Implementations§
Source§impl ShaderMask
impl ShaderMask
Sourcepub const fn new(shader: MaskShader) -> ShaderMask
pub const fn new(shader: MaskShader) -> ShaderMask
A mask that multiplies shader into the subtree.
Sourcepub const fn blend(self, blend: BlendMode) -> ShaderMask
pub const fn blend(self, blend: BlendMode) -> ShaderMask
Meets the subtree with blend instead of multiplying.
Trait Implementations§
Source§impl Clone for ShaderMask
impl Clone for ShaderMask
Source§fn clone(&self) -> ShaderMask
fn clone(&self) -> ShaderMask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShaderMask
Source§impl Debug for ShaderMask
impl Debug for ShaderMask
Source§impl PartialEq for ShaderMask
impl PartialEq for ShaderMask
impl StructuralPartialEq for ShaderMask
Auto Trait Implementations§
impl Freeze for ShaderMask
impl RefUnwindSafe for ShaderMask
impl Send for ShaderMask
impl Sync for ShaderMask
impl Unpin for ShaderMask
impl UnsafeUnpin for ShaderMask
impl UnwindSafe for ShaderMask
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