pub enum SceneObjectKind {
Polyline {
points: Vec<(f64, f64)>,
color: String,
style: LineStyle,
width: f64,
},
BoundedBox {
x0: f64,
y0: f64,
x1: f64,
y1: f64,
fill_color: Option<String>,
border_color: Option<String>,
},
Fill {
points: Vec<(f64, f64)>,
color: String,
},
Text {
x: f64,
y: f64,
content: String,
color: String,
},
Tooltip {
x: f64,
y: f64,
content: String,
},
Table {
x: f64,
y: f64,
rows: Vec<Vec<String>>,
},
}Expand description
Geometry and style of a scene object.
Every color field follows the contract in crate::viz::sanitize_color:
#rgb, #rrggbb, #rrggbbaa or var(--name). Renderers should pass colors
through that function instead of inventing their own parsing.
Variants§
Polyline
BoundedBox
A bounded box (e.g. a zone, order block, or pattern annotation).
Fill
An area fill between an arbitrary polygon’s vertices (e.g. the region between two lines).
Text
Tooltip
Table
Trait Implementations§
Source§impl Clone for SceneObjectKind
impl Clone for SceneObjectKind
Source§fn clone(&self) -> SceneObjectKind
fn clone(&self) -> SceneObjectKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneObjectKind
impl Debug for SceneObjectKind
Source§impl<'de> Deserialize<'de> for SceneObjectKind
impl<'de> Deserialize<'de> for SceneObjectKind
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 SceneObjectKind
impl PartialEq for SceneObjectKind
Source§impl Serialize for SceneObjectKind
impl Serialize for SceneObjectKind
impl StructuralPartialEq for SceneObjectKind
Auto Trait Implementations§
impl Freeze for SceneObjectKind
impl RefUnwindSafe for SceneObjectKind
impl Send for SceneObjectKind
impl Sync for SceneObjectKind
impl Unpin for SceneObjectKind
impl UnsafeUnpin for SceneObjectKind
impl UnwindSafe for SceneObjectKind
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