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

Function plot_y_domain

src/plot_state.rs:961–978  ·  view source on GitHub ↗
(
    widget: &PlotWidget,
    data_min: Option<DVec2>,
    data_max: Option<DVec2>,
)

Source from the content-addressed store, hash-verified

959 self.update_axis_links();
960 }
961
962 fn cursor_world_data(&self, viewport: DVec2) -> Option<[f64; 2]> {
963 let plot = self.camera.screen_to_world(
964 DVec2::new(self.cursor_position.x as f64, self.cursor_position.y as f64),
965 viewport,
966 );
967 plot_point_to_data([plot.x, plot.y], self.x_axis_scale, self.y_axis_scale)
968 }
969}
970
971#[derive(Debug, Clone)]
972pub(crate) struct FillSpan {
973 pub(crate) color: Color,
974 /// Triangle list vertices in plot/world coordinates.
975 pub(crate) vertices: Arc<[[f64; 2]]>,
976}
977
978enum FillEndpoint<'a> {
979 Series(&'a crate::Series),
980 HLine(&'a HLine),
981 VLine(&'a VLine),

Callers 1

rebuild_from_widgetMethod · 0.85

Calls 1

data_to_plotMethod · 0.80

Tested by

no test coverage detected