pub enum Paint {
Rect(PaintRect),
Text(PaintText),
Image(PaintImage),
Tick(PaintTick),
Shadow {
x: f32,
y: f32,
width: f32,
height: f32,
radius: f32,
blur: f32,
color: Rgba,
},
PushClip {
x: f32,
y: f32,
width: f32,
height: f32,
radius: Corners,
},
PopClip,
PushTransform(Transform),
PopTransform,
PushOpacity {
alpha: f32,
width: f32,
height: f32,
},
PopOpacity,
}Expand description
A drawable item in painter’s order (parents before children).
Variants§
Rect(PaintRect)
Text(PaintText)
Image(PaintImage)
Tick(PaintTick)
Shadow
A blurred box-shadow, drawn behind its box. Geometry already has the
offset and spread applied.
PushClip
Begin clipping subsequent items to this rounded rect (overflow: clip).
PopClip
End the most recent clip.
PushTransform(Transform)
Begin an affine transform on the subtree. The matrix already has the
transform-origin baked in, so it applies directly to absolute coords.
PopTransform
End the most recent transform.
PushOpacity
Begin a translucent layer over the subtree (opacity). The shape is the
whole viewport, so the layer fades without also clipping.
PopOpacity
End the most recent opacity layer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnsafeUnpin for Paint
impl UnwindSafe for Paint
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