pub struct NewShape { /* private fields */ }
Implementations§
Source§impl NewShape
impl NewShape
Sourcepub fn line(self, value: ShapeLine) -> Self
pub fn line(self, value: ShapeLine) -> Self
Sets the shape line properties (color
, width
, dash
).
Sourcepub fn fill_color(self, value: impl Color) -> Self
pub fn fill_color(self, value: impl Color) -> Self
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, value: FillRule) -> Self
pub fn fill_rule(self, value: FillRule) -> Self
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, value: f64) -> Self
pub fn opacity(self, value: f64) -> Self
Sets the opacity of new shapes. Number between or equal to 0 and 1.
Sourcepub fn layer(self, value: ShapeLayer) -> Self
pub fn layer(self, value: ShapeLayer) -> Self
Specifies whether new shapes are drawn below or above traces.
Sourcepub fn draw_direction(self, value: DrawDirection) -> Self
pub fn draw_direction(self, value: DrawDirection) -> Self
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.