pub struct Mask(Arc<MaskRepr>);Expand description
A mask.
Tuple Fields§
§0: Arc<MaskRepr>Implementations§
Source§impl Mask
impl Mask
Sourcepub fn new_luminance(pixmap: &Pixmap) -> Self
pub fn new_luminance(pixmap: &Pixmap) -> Self
Create a new luminance mask from the pixmap.
Sourcepub fn from_parts(data: Vec<u8>, width: u16, height: u16) -> Self
pub fn from_parts(data: Vec<u8>, width: u16, height: u16) -> Self
Create a new mask from the given alpha data.
The data vector must be of length width * height exactly.
The pixels are in row-major order.
§Panics
Panics if the data vector is not of length width * height.
fn new_with(pixmap: &Pixmap, alpha_mask: bool) -> Self
Trait Implementations§
impl Eq for Mask
impl StructuralPartialEq for Mask
Auto Trait Implementations§
impl Freeze for Mask
impl RefUnwindSafe for Mask
impl Send for Mask
impl Sync for Mask
impl Unpin for Mask
impl UnsafeUnpin for Mask
impl UnwindSafe for Mask
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