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

Method add_fill

src/plot_widget.rs:245–258  ·  view source on GitHub ↗

Add a filled region between two shapes.

(&mut self, fill: Fill)

Source from the content-addressed store, hash-verified

243 Err(SeriesError::NotFound(*id))
244 }
245 }
246
247 /// Add a vertical reference line to the plot.
248 /// If there exists a line with the same `vline.id` ([ShapeId]), the old one will be replaced.
249 pub fn add_vline(&mut self, vline: VLine) {
250 self.vlines.insert(vline.id, vline);
251 self.data_version += 1;
252 }
253
254 /// Add a filled region between two shapes.
255 pub fn add_fill(&mut self, fill: Fill) -> Result<(), SeriesError> {
256 if fill.begin == fill.end {
257 return Err(SeriesError::InvalidFillEndpoints);
258 }
259 if !self.is_fill_endpoint_available(fill.begin) {
260 return Err(SeriesError::FillEndpointNotFound(fill.begin));
261 }

Callers 2

newFunction · 0.45
newMethod · 0.45

Calls 1

Tested by

no test coverage detected