pub enum DiagramShape {
Path {
points: Vec<[f32; 2]>,
closed: bool,
stroke: DiagramStroke,
fill: bool,
},
Circle {
center: [f32; 2],
radius: f32,
stroke: DiagramStroke,
fill: bool,
},
Text {
at: [f32; 2],
text: String,
mono: bool,
},
}Expand description
A shape of a Widget::Diagram, in its coordinates.
A package builds these, so a variant keeps its fields for as long as
the contract’s minor version holds: a new option comes as a new
variant, or as a new struct that derives Default.
Variants§
Path
A run of straight lines; fill shades it, and reads only a convex
outline right.
Circle
Text
Text at a point, centred on it.
Trait Implementations§
Source§impl Clone for DiagramShape
impl Clone for DiagramShape
Source§impl Debug for DiagramShape
impl Debug for DiagramShape
Source§impl<'de> Deserialize<'de> for DiagramShape
impl<'de> Deserialize<'de> for DiagramShape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DiagramShape
impl PartialEq for DiagramShape
Source§impl Serialize for DiagramShape
impl Serialize for DiagramShape
impl StructuralPartialEq for DiagramShape
Auto Trait Implementations§
impl Forget for DiagramShape
impl Freeze for DiagramShape
impl Move for DiagramShape
impl RefUnwindSafe for DiagramShape
impl Send for DiagramShape
impl Sync for DiagramShape
impl Unpin for DiagramShape
impl UnsafeUnpin for DiagramShape
impl UnwindSafe for DiagramShape
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