pub enum ClipShape {
Rect,
RRect(BorderRadius),
Oval,
Path(Path),
}Expand description
The clip shape of a Primitive::Layer, inscribed in its clip rectangle.
Compositing multiplies the layer’s alpha by the shape’s coverage, with
antialiased edges. This is the building block of the ClipRRect, ClipOval
and ClipPath widgets.
Variants§
Rect
A crisp rectangular clip — the layer’s clip, unchanged.
RRect(BorderRadius)
A rounded-corner rectangle, with a per-corner radius
(BorderRadius, logical px) clamped to half the clip’s smaller side. A
uniform radius is still BorderRadius::uniform(r).
Oval
An ellipse inscribed in the clip — a circle when the clip is square.
Path(Path)
An arbitrary path, in absolute screen coordinates: compositing renders it
into a coverage mask which it multiplies into the layer’s alpha. The
building block of ClipPath — stars, notches, free-form shapes.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ClipShape
Auto Trait Implementations§
impl Freeze for ClipShape
impl RefUnwindSafe for ClipShape
impl Send for ClipShape
impl Sync for ClipShape
impl Unpin for ClipShape
impl UnsafeUnpin for ClipShape
impl UnwindSafe for ClipShape
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