pub struct ContentMask {
pub bounds: Bounds,
pub radii: Corners<f32>,
}Expand description
Clip region (device pixels), optionally with rounded corners.
Fields§
§bounds: Bounds§radii: Corners<f32>Implementations§
Source§impl ContentMask
impl ContentMask
pub const NONE: ContentMask
pub fn new(bounds: Bounds) -> Self
pub fn rounded(bounds: Bounds, radii: Corners<f32>) -> Self
Sourcepub fn intersect(&self, other: &ContentMask) -> ContentMask
pub fn intersect(&self, other: &ContentMask) -> ContentMask
Intersection of two masks. Only one set of corner radii can be represented, so the radii of the smaller (inner) mask are kept.
Trait Implementations§
Source§impl Clone for ContentMask
impl Clone for ContentMask
impl Copy for ContentMask
Source§impl Debug for ContentMask
impl Debug for ContentMask
Source§impl PartialEq for ContentMask
impl PartialEq for ContentMask
impl StructuralPartialEq for ContentMask
Auto Trait Implementations§
impl Freeze for ContentMask
impl RefUnwindSafe for ContentMask
impl Send for ContentMask
impl Sync for ContentMask
impl Unpin for ContentMask
impl UnsafeUnpin for ContentMask
impl UnwindSafe for ContentMask
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