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

Function world_to_screen_position_x

src/plot_widget.rs:1953–1966  ·  view source on GitHub ↗

Convert world position to screen position

(
    x: f64,
    camera: &Camera,
    bounds: &Rectangle,
)

Source from the content-addressed store, hash-verified

1951
1952impl PlotWidget {
1953 pub(crate) fn pick_hit(&self, state: &mut PlotState) -> Option<PointId> {
1954 let PlotState {
1955 picking: pick_state,
1956 cursor_position,
1957 hover_radius_px,
1958 points,
1959 series,
1960 camera,
1961 bounds,
1962 ..
1963 } = state;
1964 let force_cpu_picking = self.render_strategy.force_cpu_picking();
1965
1966 pick_state.request_pick_hit(
1967 self.instance_id,
1968 *cursor_position,
1969 *hover_radius_px,

Callers 3

update_ticksMethod · 0.85
draw_reference_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected