#[non_exhaustive]pub enum Paint {
None,
Quad(QuadPaint),
Custom(Rc<dyn Fn(Rect, &mut Scene)>),
Live(Rc<dyn Fn(Rect, f64, &mut Scene)>),
Rich(Rc<dyn Fn(Rect, &mut PaintCx<'_>)>),
}Expand description
What an element draws before its children.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Draws nothing.
Quad(QuadPaint)
A rounded rectangle.
Custom(Rc<dyn Fn(Rect, &mut Scene)>)
Arbitrary drawing into the scene, given the element’s absolute frame.
Live(Rc<dyn Fn(Rect, f64, &mut Scene)>)
Arbitrary drawing that keeps changing (spinners, pulses), without rebuilding.
Rich(Rc<dyn Fn(Rect, &mut PaintCx<'_>)>)
Arbitrary drawing that also shapes text or needs the device scale.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Paint
impl !Send for Paint
impl !Sync for Paint
impl !UnwindSafe for Paint
impl Freeze for Paint
impl Unpin for Paint
impl UnsafeUnpin for Paint
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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