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

Function transformed_series_points

src/plot_state.rs:980–999  ·  view source on GitHub ↗
(
    series: &crate::Series,
    x_axis_scale: AxisScale,
    y_axis_scale: AxisScale,
    axis_ranges: ([f64; 2], [f64; 2]),
)

Source from the content-addressed store, hash-verified

978enum FillEndpoint<'a> {
979 Series(&'a crate::Series),
980 HLine(&'a HLine),
981 VLine(&'a VLine),
982}
983
984fn resolve_fill_endpoint<'a>(widget: &'a PlotWidget, id: ShapeId) -> Option<FillEndpoint<'a>> {
985 if let Some(series) = widget.series.get(&id) {
986 return Some(FillEndpoint::Series(series));
987 }
988 if let Some(hline) = widget.hlines.get(&id) {
989 return Some(FillEndpoint::HLine(hline));
990 }
991 if let Some(vline) = widget.vlines.get(&id) {
992 return Some(FillEndpoint::VLine(vline));
993 }
994 None
995}
996
997fn plot_x_domain(
998 widget: &PlotWidget,
999 data_min: Option<DVec2>,
1000 data_max: Option<DVec2>,
1001) -> Option<(f64, f64)> {
1002 if let Some((min, max)) = widget.x_lim

Callers 1

build_fill_spanFunction · 0.85

Calls 1

Tested by

no test coverage detected