pub enum Prim {
Rect {
rect: ScreenRect,
fill: Rgba,
stroke: Option<(f32, Rgba)>,
},
Line {
points: Vec<ScreenPoint>,
width: f32,
color: Rgba,
},
Polygon {
points: Vec<ScreenPoint>,
fill: Rgba,
stroke: Option<(f32, Rgba)>,
},
Circle {
center: ScreenPoint,
radius: f32,
fill: Rgba,
stroke: Option<(f32, Rgba)>,
},
Text {
pos: ScreenPoint,
text: String,
size: f32,
color: Rgba,
anchor: Anchor,
},
}Expand description
One primitive of a rendered chart.
Variants§
Rect
A filled or stroked rectangle.
Fields
§
rect: ScreenRectBounds.
Line
A stroked polyline.
Polygon
A filled or stroked polygon.
Fields
§
points: Vec<ScreenPoint>Vertices.
Circle
A circle.
Fields
§
center: ScreenPointCenter.
Text
One line of text; pos is the top-left of the line box.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Prim
Auto Trait Implementations§
impl Forget for Prim
impl Freeze for Prim
impl Move for Prim
impl RefUnwindSafe for Prim
impl Send for Primwhere
RawVecInner: Send,
impl Sync for Primwhere
RawVecInner: Sync,
impl Unpin for Prim
impl UnsafeUnpin for Primwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ScreenPoint>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Primwhere
RawVecInner: UnwindSafe,
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