pub trait Coord: Send + Sync {
// Required method
fn transform(&self, point: (f64, f64), plot_area: &Rect) -> (f64, f64);
// Provided methods
fn gridlines(&self) -> bool { ... }
fn is_flipped(&self) -> bool { ... }
fn is_polar(&self) -> bool { ... }
fn zoom_x(&self) -> Option<(f64, f64)> { ... }
fn zoom_y(&self) -> Option<(f64, f64)> { ... }
fn set_domains(&mut self, _x: Option<AxisSpan>, _y: Option<AxisSpan>) { ... }
}Expand description
Trait for coordinate systems.
Required Methods§
Provided Methods§
Sourcefn is_flipped(&self) -> bool
fn is_flipped(&self) -> bool
Whether this coordinate system flips X and Y.
Sourcefn 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).
Sourcefn 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".