pub enum Shape {
Box {
c: Point,
w: f64,
h: f64,
rad: f64,
style: Style,
text: Vec<TextLine>,
},
Circle {
c: Point,
r: f64,
style: Style,
text: Vec<TextLine>,
},
Ellipse {
c: Point,
w: f64,
h: f64,
style: Style,
text: Vec<TextLine>,
},
Path {
pts: Vec<Point>,
closed: bool,
arrows: Arrowheads,
style: Style,
text: Vec<TextLine>,
},
Spline {
pts: Vec<Point>,
tension: Option<f64>,
arrows: Arrowheads,
style: Style,
text: Vec<TextLine>,
},
Arc {
c: Point,
r: f64,
a0: f64,
a1: f64,
cw: bool,
arrows: Arrowheads,
style: Style,
text: Vec<TextLine>,
},
Brace {
a: Point,
b: Point,
cubics: Vec<[Point; 4]>,
label_at: Point,
style: Style,
text: Vec<TextLine>,
},
Text {
at: Point,
text: Vec<TextLine>,
bbox: Bbox,
w: f64,
h: f64,
standalone: bool,
},
}Expand description
A placed drawing primitive.
Variants§
Box
Circle
Ellipse
Path
Straight polyline (line / arrow / move).
Fields
§
arrows: ArrowheadsSpline
Fields
§
tension: Option<f64>dpic spline tension. None = the classic pic quadratic B-spline
(straight first/last half-segments, tangent at segment midpoints);
Some(t) = dpic’s tensioned cubic spline through t.
§
arrows: ArrowheadsArc
Fields
§
arrows: ArrowheadsBrace
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