pub struct NewShape { /* private fields */ }
Implementations§
Source§impl NewShape
impl NewShape
pub fn new() -> NewShape
Sourcepub fn line(self, line: ShapeLine) -> NewShape
pub fn line(self, line: ShapeLine) -> NewShape
Sets the shape line properties (color
, width
, dash
).
Sourcepub fn fill_color<C: Color>(self, fill_color: C) -> NewShape
pub fn fill_color<C: Color>(self, fill_color: C) -> NewShape
Sets the color filling new shapes’ interior. Please note that if using a fillcolor with alpha greater than half, drag inside the active shape starts moving the shape underneath, otherwise a new shape could be started over.
Sourcepub fn fill_rule(self, fill_rule: FillRule) -> NewShape
pub fn fill_rule(self, fill_rule: FillRule) -> NewShape
Determines the path’s interior. For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule
Sourcepub fn opacity(self, opacity: f64) -> NewShape
pub fn opacity(self, opacity: f64) -> NewShape
Sets the opacity of new shapes. Number between or equal to 0 and 1.
Sourcepub fn layer(self, layer: ShapeLayer) -> NewShape
pub fn layer(self, layer: ShapeLayer) -> NewShape
Specifies whether new shapes are drawn below or above traces.
Sourcepub fn draw_direction(self, draw_direction: DrawDirection) -> NewShape
pub fn draw_direction(self, draw_direction: DrawDirection) -> NewShape
When dragmode
is set to “drawrect”, “drawline” or “drawcircle” this limits the drag to be
horizontal, vertical or diagonal. Using “diagonal” there is no limit e.g. in drawing lines
in any direction. “ortho” limits the draw to be either horizontal or vertical. “horizontal”
allows horizontal extend. “vertical” allows vertical extend.