pub enum ImageClip {
Ellipse,
RoundedRect {
radius: f64,
},
}Expand description
A non-rectangular clip shape applied to a SceneCommand::DrawImage.
None on the DrawImage (no clip_shape) means the default rectangular
box-clip (the raster is clipped to its declared [x, y, w, h] box). A
Some value constrains the blit to a shape INSCRIBED in that box:
Ellipse— the ellipse inscribed in the box (a circle when the box is square): the circular-avatar case.RoundedRect { radius }— a rounded rectangle with uniform corner radius.
Tagged in JSON via #[serde(tag = "shape")] for a self-describing form,
consistent with the op-tagged SceneCommand.
Variants§
Ellipse
Clip to the ellipse inscribed in the image’s [x, y, w, h] box.
RoundedRect
Clip to a rounded rectangle with uniform corner radius (pixels).
Trait Implementations§
impl StructuralPartialEq for ImageClip
Auto Trait Implementations§
impl Freeze for ImageClip
impl RefUnwindSafe for ImageClip
impl Send for ImageClip
impl Sync for ImageClip
impl Unpin for ImageClip
impl UnsafeUnpin for ImageClip
impl UnwindSafe for ImageClip
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