Struct egui_plot::PlotBounds
source · pub struct PlotBounds { /* private fields */ }Expand description
2D bounding box of f64 precision.
The range of data values we show.
Implementations§
source§impl PlotBounds
impl PlotBounds
pub const NOTHING: Self = _
pub fn from_min_max(min: [f64; 2], max: [f64; 2]) -> Self
pub fn min(&self) -> [f64; 2]
pub fn max(&self) -> [f64; 2]
pub fn new_symmetrical(half_extent: f64) -> Self
pub fn is_finite(&self) -> bool
pub fn is_finite_x(&self) -> bool
pub fn is_finite_y(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn is_valid_x(&self) -> bool
pub fn is_valid_y(&self) -> bool
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn center(&self) -> PlotPoint
sourcepub fn extend_with(&mut self, value: &PlotPoint)
pub fn extend_with(&mut self, value: &PlotPoint)
Expand to include the given (x,y) value
sourcepub fn extend_with_x(&mut self, x: f64)
pub fn extend_with_x(&mut self, x: f64)
Expand to include the given x coordinate
sourcepub fn extend_with_y(&mut self, y: f64)
pub fn extend_with_y(&mut self, y: f64)
Expand to include the given y coordinate
pub fn expand_x(&mut self, pad: f64)
pub fn expand_y(&mut self, pad: f64)
pub fn merge_x(&mut self, other: &Self)
pub fn merge_y(&mut self, other: &Self)
pub fn set_x(&mut self, other: &Self)
pub fn set_x_center_width(&mut self, x: f64, width: f64)
pub fn set_y(&mut self, other: &Self)
pub fn set_y_center_height(&mut self, y: f64, height: f64)
pub fn merge(&mut self, other: &Self)
pub fn translate_x(&mut self, delta: f64)
pub fn translate_y(&mut self, delta: f64)
pub fn translate(&mut self, delta: (f64, f64))
pub fn zoom(&mut self, zoom_factor: Vec2, center: PlotPoint)
pub fn add_relative_margin_x(&mut self, margin_fraction: Vec2)
pub fn add_relative_margin_y(&mut self, margin_fraction: Vec2)
pub fn range_x(&self) -> RangeInclusive<f64>
pub fn range_y(&self) -> RangeInclusive<f64>
pub fn make_x_symmetrical(&mut self)
pub fn make_y_symmetrical(&mut self)
Trait Implementations§
source§impl Clone for PlotBounds
impl Clone for PlotBounds
source§fn clone(&self) -> PlotBounds
fn clone(&self) -> PlotBounds
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PlotBounds
impl Debug for PlotBounds
source§impl<'de> Deserialize<'de> for PlotBounds
impl<'de> Deserialize<'de> for PlotBounds
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for PlotBounds
impl PartialEq for PlotBounds
source§fn eq(&self, other: &PlotBounds) -> bool
fn eq(&self, other: &PlotBounds) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for PlotBounds
impl Serialize for PlotBounds
impl Copy for PlotBounds
impl StructuralPartialEq for PlotBounds
Auto Trait Implementations§
impl Freeze for PlotBounds
impl RefUnwindSafe for PlotBounds
impl Send for PlotBounds
impl Sync for PlotBounds
impl Unpin for PlotBounds
impl UnwindSafe for PlotBounds
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)