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

Function data_point_to_plot_with_transform

src/transform.rs:314–335  ·  view source on GitHub ↗
(
    point: [f64; 2],
    x_scale: AxisScale,
    y_scale: AxisScale,
    transform: &PositionTransform,
    axis_ranges: Option<([f64; 2], [f64; 2])>,
)

Source from the content-addressed store, hash-verified

312}
313
314pub(crate) fn data_point_to_plot_with_transform(
315 point: [f64; 2],
316 x_scale: AxisScale,
317 y_scale: AxisScale,
318 transform: &PositionTransform,
319 axis_ranges: Option<([f64; 2], [f64; 2])>,
320) -> Option<[f64; 2]> {
321 Some([
322 data_value_to_plot_with_axis_range(
323 point[0],
324 x_scale,
325 transform.x.as_ref(),
326 axis_ranges.map(|ranges| ranges.0),
327 )?,
328 data_value_to_plot_with_axis_range(
329 point[1],
330 y_scale,
331 transform.y.as_ref(),
332 axis_ranges.map(|ranges| ranges.1),
333 )?,
334 ])
335}
336
337pub(crate) fn plot_point_to_data(
338 point: [f64; 2],

Callers 8

transform_pointMethod · 0.85
rebuild_from_widgetMethod · 0.85
draw_highlightsFunction · 0.85

Calls 2

mapMethod · 0.80

Tested by

no test coverage detected