pub struct ClipMask { /* private fields */ }Expand description
A per-pixel inclusion mask produced by clipping.
None means “no clip”: every pixel is inside. A Some(mask) is row-major,
one bool per pixel, and painting is restricted to the set entries.
Implementations§
Source§impl ClipMask
impl ClipMask
Sourcepub fn all(width: u32, height: u32) -> Self
pub fn all(width: u32, height: u32) -> Self
A mask that contains every pixel of a width × height canvas.
Sourcepub fn multiply_luminosity(&mut self, group: &Canvas)
pub fn multiply_luminosity(&mut self, group: &Canvas)
Multiply this mask’s coverage by a rendered group’s luminosity (11.6.5.2).
group is the soft mask’s /G rendered onto black, so an unpainted area
has luminance 0 and hides everything, and white shows everything.
Trait Implementations§
impl StructuralPartialEq for ClipMask
Auto Trait Implementations§
impl Forget for ClipMask
impl Freeze for ClipMask
impl Move for ClipMask
impl RefUnwindSafe for ClipMask
impl Send for ClipMask
impl Sync for ClipMask
impl Unpin for ClipMask
impl UnsafeUnpin for ClipMask
impl UnwindSafe for ClipMask
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