pub enum DrawCommand {
Show 21 variants
Clear(Color),
RoundedRect {
bounds: Rect,
radius: f32,
color: Color,
},
Ellipse {
bounds: Rect,
color: Color,
},
Outline {
bounds: Rect,
radius: f32,
width: f32,
color: Color,
},
Text {
bounds: Rect,
text: Arc<str>,
color: Color,
style: TextStyle,
},
Shadow {
bounds: Rect,
radius: f32,
offset: [f32; 2],
blur: f32,
spread: f32,
color: Color,
},
Ripple {
bounds: Rect,
corner_radius: f32,
center: [f32; 2],
radius: f32,
color: Color,
soft: bool,
},
Loading {
bounds: Rect,
sample: LoadingSample,
color: Color,
},
Image {
bounds: Rect,
uv: [f32; 4],
radius: f32,
color: Color,
image: Image,
},
Shape {
bounds: Rect,
index: u8,
color: Color,
rotation: f32,
},
Arc {
bounds: Rect,
start: f32,
sweep: f32,
stroke: f32,
color: Color,
rounded: bool,
},
Line {
from: [f32; 2],
to: [f32; 2],
width: f32,
color: Color,
},
Polyline {
points: [[f32; 2]; 3],
count: u8,
width: f32,
color: Color,
},
PushClip(Rect),
PopClip,
PushScaleY {
origin: f32,
scale: f32,
},
PopScaleY,
PushTransform {
origin: [f32; 2],
translate: [f32; 2],
scale: [f32; 2],
rotation_rad: f32,
},
PopTransform,
PushLayer {
bounds: Rect,
alpha: f32,
},
PopLayer,
}Variants§
Clear(Color)
RoundedRect
Ellipse
Outline
Text
Shadow
Ripple
Soft radial ink, clipped to the control’s rounded shape in every renderer.
Loading
Image
A caller-owned RGBA image with a normalized source crop.
Shape
A static, tessellated Beer CSS shape.
Arc
Line
Polyline
A two- or three-point stroke with flat caps and a miter join.
PushClip(Rect)
PopClip
PushScaleY
PopScaleY
PushTransform
PopTransform
PushLayer
PopLayer
Trait Implementations§
Source§impl Clone for DrawCommand
impl Clone for DrawCommand
Source§impl Debug for DrawCommand
impl Debug for DrawCommand
Source§impl PartialEq for DrawCommand
impl PartialEq for DrawCommand
impl StructuralPartialEq for DrawCommand
Auto Trait Implementations§
impl Forget for DrawCommand
impl Freeze for DrawCommand
impl Move for DrawCommand
impl RefUnwindSafe for DrawCommand
impl Send for DrawCommand
impl Sync for DrawCommand
impl Unpin for DrawCommand
impl UnsafeUnpin for DrawCommand
impl UnwindSafe for DrawCommand
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