pub enum Shape {
Polyline {
points: Vec<[f64; 2]>,
stroke: String,
width: f64,
dash: bool,
},
Dashed {
points: Vec<[f64; 2]>,
stroke: String,
width: f64,
dash: f64,
gap: f64,
},
Polygon {
points: Vec<[f64; 2]>,
fill: String,
opacity: f64,
stroke: Option<String>,
dash: bool,
},
Circle {
c: [f64; 2],
r: f64,
fill: String,
},
Symbol {
at: [f64; 2],
kind: String,
size: f64,
fill: String,
stroke: String,
},
Text {
at: [f64; 2],
text: String,
anchor: Anchor,
size: f64,
fill: String,
},
}Expand description
A primitive, in pixels. Colours are strings, written as attributes.
Variants§
Polyline
An open line.
Dashed
An open line drawn dashed, with the lengths it was asked: a dash and a
gap in pixels (stroke-dasharray), butt caps so that a gap stays a gap.
Fields
Polygon
A closed area.
Fields
Circle
A disc.
Symbol
A marker’s symbol, centred on at and size pixels across: written as
paths, so nothing is loaded and nothing is stripped, and kept at its
pixel size by the zoom script (data-zoom-fixed) like a well’s head.
Fields
§
kind: StringThe shape, one of crate::markers::declared’s ids that is drawn.
Text
A text.
Trait Implementations§
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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