pub enum ChartPrimitive {
Rect {
x: f64,
y: f64,
w: f64,
h: f64,
fill: Color,
},
Line {
x1: f64,
y1: f64,
x2: f64,
y2: f64,
stroke: Color,
width: f64,
},
Polyline {
points: Vec<(f64, f64)>,
stroke: Color,
width: f64,
},
FilledPath {
points: Vec<(f64, f64)>,
fill: Color,
opacity: f64,
},
Circle {
cx: f64,
cy: f64,
r: f64,
fill: Color,
},
ArcSector {
cx: f64,
cy: f64,
r: f64,
start_angle: f64,
end_angle: f64,
fill: Color,
},
Label {
text: String,
x: f64,
y: f64,
font_size: f64,
color: Color,
anchor: TextAnchor,
},
VerticalLabel {
text: String,
x: f64,
y: f64,
font_size: f64,
color: Color,
},
}Expand description
A drawing primitive emitted by chart builders.
Variants§
Rect
A filled rectangle.
Line
A stroked line segment.
Polyline
A stroked polyline (connected line segments).
FilledPath
A filled closed polygon.
Circle
A filled circle.
ArcSector
A filled arc sector (pie slice).
Label
A text label.
VerticalLabel
A text label rotated to read bottom to top, centred on (x, y): a y-axis title.
Trait Implementations§
Source§impl Clone for ChartPrimitive
impl Clone for ChartPrimitive
Auto Trait Implementations§
impl Freeze for ChartPrimitive
impl RefUnwindSafe for ChartPrimitive
impl Send for ChartPrimitive
impl Sync for ChartPrimitive
impl Unpin for ChartPrimitive
impl UnsafeUnpin for ChartPrimitive
impl UnwindSafe for ChartPrimitive
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