pub enum Primitive {
Rect {
rect: Rect,
color: Rgba,
},
Line {
from: Pos,
to: Pos,
color: Rgba,
width: f32,
dashed: bool,
},
Polyline {
points: Vec<Pos>,
color: Rgba,
width: f32,
},
Area {
points: Vec<Pos>,
baseline: f32,
color: Rgba,
},
Text {
pos: Pos,
text: String,
color: Rgba,
h_align: Align,
v_align: Align,
},
}Expand description
One thing to draw.
Variants§
Rect
A filled rectangle.
Line
A straight line.
Fields
Polyline
Connected line segments.
Fields
Area
The region between a polyline and a horizontal baseline, filled.
Fields
Text
A single line of text.
Trait Implementations§
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Forget for Primitive
impl Freeze for Primitive
impl Move for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more