pub enum DrawCommand {
Rect {
rect: Rect,
style: Arc<RectStyle>,
},
Text {
text: Arc<str>,
rect: Rect,
style: Arc<TextStyle>,
},
RichText {
runs: Arc<[TextRun]>,
rect: Rect,
base: Arc<TextStyle>,
},
Image {
data: Arc<ImageData>,
rect: Rect,
filter: ImageFilter,
},
Line {
p1: Point,
p2: Point,
style: Stroke,
},
Path {
data: Arc<PathData>,
style: Arc<PathStyle>,
},
PushClip {
rect: Rect,
radius: BorderRadius,
},
PopClip,
PushMatrix {
matrix: [f32; 6],
},
PopMatrix,
PushLayer {
opacity: f32,
backdrop_blur: f32,
},
PopLayer,
}Variants§
Rect
Text
RichText
A paragraph of mixed-style runs shaped and wrapped as one (freedesktop notification body markup, etc.).
base supplies the shared metrics; each run carries its own weight/italic/colour.
Image
Line
Path
PushClip
PopClip
PushMatrix
PopMatrix
PushLayer
PopLayer
Trait Implementations§
Source§impl Clone for DrawCommand
impl Clone for DrawCommand
Source§fn clone(&self) -> DrawCommand
fn clone(&self) -> DrawCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DrawCommand
impl Debug for DrawCommand
Auto Trait Implementations§
impl !RefUnwindSafe for DrawCommand
impl !UnwindSafe for DrawCommand
impl Freeze for DrawCommand
impl Send for DrawCommand
impl Sync for DrawCommand
impl Unpin for DrawCommand
impl UnsafeUnpin 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