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

Function update_ticks_and_build_payload

src/plot_widget.rs:1420–1453  ·  view source on GitHub ↗
(
    widget: &PlotWidget,
    state: &mut PlotState,
    effects: &mut UpdateEffects,
    first_time_widget_view: bool,
)

Source from the content-addressed store, hash-verified

1418 (p)(world[0], world[1])
1419 } else {
1420 format!("{:.4}, {:.4}", world[0], world[1])
1421 };
1422
1423 effects.cursor_ui = Some(CursorPositionUiPayload {
1424 x: world[0],
1425 y: world[1],
1426 text,
1427 });
1428 } else {
1429 effects.clear_cursor_position = true;
1430 }
1431}
1432
1433fn invalidate_static_canvas(widget: &PlotWidget) {
1434 _ = widget;
1435 #[cfg(feature = "canvas")]
1436 {
1437 widget.canvas_caches.static_layer.clear();
1438 }
1439}
1440
1441fn invalidate_overlay_canvas(widget: &PlotWidget) {
1442 _ = widget;
1443 #[cfg(feature = "canvas")]
1444 {
1445 widget.canvas_caches.overlay_layer.clear();
1446 }
1447}
1448
1449fn consume_gpu_pick_results(
1450 widget: &PlotWidget,
1451 state: &mut PlotState,
1452 effects: &mut UpdateEffects,
1453) {
1454 if !(state.hover_enabled || state.pick_enabled)
1455 || state.points.len() < picking::CPU_PICK_THRESHOLD
1456 {

Callers 1

update_plot_programFunction · 0.85

Calls 3

update_ticksMethod · 0.80
thenMethod · 0.80

Tested by

no test coverage detected