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

Method draw

src/plot_widget.rs:1703–1716  ·  view source on GitHub ↗
(
        &self,
        state: &Self::State,
        _cursor: mouse::Cursor,
        _bounds: Rectangle,
    )

Source from the content-addressed store, hash-verified

1701 // existing highlight_version path whenever camera or viewport bounds change.
1702 if !state.highlighted_points.is_empty()
1703 && (state.camera != prev_camera || state.bounds != prev_bounds)
1704 {
1705 state.highlight_version = state.highlight_version.wrapping_add(1);
1706 effects.needs_redraw = true;
1707 invalidation.overlay_layer();
1708 }
1709
1710 if state.camera != prev_camera || state.bounds != prev_bounds {
1711 effects.needs_redraw = true;
1712 effects.publish_camera_bounds = true;
1713 invalidation.all();
1714 }
1715
1716 let had_hover_pick = effects.hover_pick.is_some();
1717 // Process picking results after event handling (works for both mouse events and data updates).
1718 consume_gpu_pick_results(widget, state, &mut effects);
1719 if !had_hover_pick && effects.hover_pick.is_some() {

Callers

nothing calls this directly

Calls 2

drawFunction · 0.85
cached_styleMethod · 0.80

Tested by

no test coverage detected