MCPcopy Create free account
hub / github.com/emilk/egui_plot / zoom_bounds

Method zoom_bounds

egui_plot/src/plot.rs:1962–1965  ·  view source on GitHub ↗

Scale the plot bounds around a position in plot coordinates. Can be useful for implementing alternative plot navigation methods. The plot bounds are divided by `zoom_factor`, therefore: - `zoom_factor < 1.0` zooms out, i.e., increases the visible range to show more data. - `zoom_factor > 1.0` zooms in, i.e., reduces the visible range to show more detail.

(&mut self, zoom_factor: Vec2, center: PlotPoint)

Source from the content-addressed store, hash-verified

1960 /// - `zoom_factor > 1.0` zooms in, i.e., reduces the visible range to show
1961 /// more detail.
1962 pub fn zoom_bounds(&mut self, zoom_factor: Vec2, center: PlotPoint) {
1963 self.bounds_modifications
1964 .push(BoundsModification::Zoom(zoom_factor, center));
1965 }
1966
1967 /// Scale the plot bounds around the hovered position, if any.
1968 ///

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected