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

Function draw_markers

src/plot_renderer/canvas.rs:247–271  ·  view source on GitHub ↗
(frame: &mut Frame, state: &PlotState, bounds: Rectangle)

Source from the content-addressed store, hash-verified

245}
246
247fn draw_markers(frame: &mut Frame, state: &PlotState, bounds: Rectangle) {
248 for series in state.series.iter() {
249 if series.marker == u32::MAX {
250 continue;
251 }
252
253 let end = series.start + series.len;
254 for (local_index, point) in state.points[series.start..end].iter().enumerate() {
255 let color = *state
256 .point_colors
257 .get(series.start + local_index)
258 .unwrap_or(&series.color);
259 draw_marker(
260 frame,
261 point.position,
262 point.size,
263 point.size_mode,
264 series.marker,
265 color,
266 &state.camera,
267 &bounds,
268 );
269 }
270 }
271}
272
273fn draw_highlights(frame: &mut Frame, state: &PlotState, bounds: Rectangle) {
274 for highlight in state.highlighted_points.iter() {

Callers 1

drawFunction · 0.85

Calls 2

draw_markerFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected