pub struct CoordFixed {
pub ratio: f64,
}Expand description
Fixed-ratio coordinate system — maintains aspect ratio.
Fields§
§ratio: f64Implementations§
Trait Implementations§
Source§impl Coord for CoordFixed
impl Coord for CoordFixed
Source§fn transform(&self, point: (f64, f64), plot_area: &Rect) -> (f64, f64)
fn transform(&self, point: (f64, f64), plot_area: &Rect) -> (f64, f64)
Transform normalized (0..1, 0..1) coordinates to pixel coordinates.
Source§fn is_flipped(&self) -> bool
fn is_flipped(&self) -> bool
Whether this coordinate system flips X and Y.
Source§fn is_polar(&self) -> bool
fn is_polar(&self) -> bool
Whether this is a non-linear polar system (bars become radial sectors,
so geoms that draw rectangles must tessellate their edges into an arc).
Source§fn polar_theta_is_x(&self) -> bool
fn polar_theta_is_x(&self) -> bool
For a polar system, whether the x aesthetic maps to angle (
theta="x").
When false (theta="y", pies), the y aesthetic is the angle, so sector
tessellation must sweep the y edge instead of the x edge.Source§fn zoom_x(&self) -> Option<(f64, f64)>
fn zoom_x(&self) -> Option<(f64, f64)>
Zoom limits for x-axis (data coordinates). Clips viewport without filtering data.
Auto Trait Implementations§
impl Freeze for CoordFixed
impl RefUnwindSafe for CoordFixed
impl Send for CoordFixed
impl Sync for CoordFixed
impl Unpin for CoordFixed
impl UnsafeUnpin for CoordFixed
impl UnwindSafe for CoordFixed
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more