MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / with_style

Method with_style

src/reference_lines.rs:76–84  ·  view source on GitHub ↗

Set the line style.

(mut self, style: LineStyle)

Source from the content-addressed store, hash-verified

74
75 /// Set the line style.
76 pub fn with_style(mut self, style: LineStyle) -> Self {
77 let old_width = self.line_style.width;
78 let preserve_width = style.width == LineStyle::default().width;
79 self.line_style = style;
80 if preserve_width {
81 self.line_style.width = old_width;
82 }
83 self
84 }
85
86 /// Set only the line type while preserving the current width.
87 pub fn with_line_type(mut self, line_type: LineType) -> Self {

Callers 4

newFunction · 0.45
plot_widgetFunction · 0.45
newFunction · 0.45
newFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected