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

Function highlight_mask_plot_position

src/plot_renderer/mod.rs:84–101  ·  view source on GitHub ↗
(highlight: &HighlightPoint, state: &PlotState)

Source from the content-addressed store, hash-verified

82}
83
84fn highlight_mask_plot_position(highlight: &HighlightPoint, state: &PlotState) -> Option<[f64; 2]> {
85 let marker_style = highlight.marker_style?;
86 let mut world = [highlight.x, highlight.y];
87
88 if let Size::World(size) = marker_style.size {
89 let half = size * 0.5;
90 world[0] += half;
91 world[1] += half;
92 }
93
94 data_point_to_plot_with_transform(
95 world,
96 state.x_axis_scale,
97 state.y_axis_scale,
98 &highlight.transform,
99 Some(state.camera.axis_ranges()),
100 )
101}

Callers 2

rebuild_highlightMethod · 0.85
draw_highlightsFunction · 0.85

Calls 2

axis_rangesMethod · 0.80

Tested by

no test coverage detected