pub struct Mask<'a> { /* private fields */ }Expand description
A borrowed 8-bit coverage mask: 0 transparent, 255 fully covered.
Implementations§
Source§impl<'a> Mask<'a>
impl<'a> Mask<'a>
Sourcepub fn new(
data: &'a [u8],
width: i32,
height: i32,
stride: usize,
) -> Option<Mask<'a>>
pub fn new( data: &'a [u8], width: i32, height: i32, stride: usize, ) -> Option<Mask<'a>>
Wraps a coverage buffer. Returns None if it is too small for the
geometry, or if stride is narrower than width.
Sourcepub fn packed(data: &'a [u8], width: i32, height: i32) -> Option<Mask<'a>>
pub fn packed(data: &'a [u8], width: i32, height: i32) -> Option<Mask<'a>>
A mask whose rows are contiguous.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Mask<'a>
impl<'a> RefUnwindSafe for Mask<'a>
impl<'a> Send for Mask<'a>
impl<'a> Sync for Mask<'a>
impl<'a> Unpin for Mask<'a>
impl<'a> UnsafeUnpin for Mask<'a>
impl<'a> UnwindSafe for Mask<'a>
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