Scaler
struct · ferroui-livecharts · v0.5.0
struct Scaler
The source affine scaler, with an optional logarithmic value transform.
Members
new
fn new(pixel_start: f64, pixel_size: f64, min: f64, max: f64, orientation: AxisOrientation, inverted: bool) -> Result<Self, ScaleError>
with_min_step
fn with_min_step(pixel_start: f64, pixel_size: f64, min: f64, max: f64, orientation: AxisOrientation, inverted: bool, min_step: f64) -> Result<Self, ScaleError>
logarithmic
fn logarithmic(pixel_start: f64, pixel_size: f64, min: f64, max: f64, orientation: AxisOrientation, inverted: bool, base: f64) -> Result<Self, ScaleError>
is_linear
fn is_linear(self: Self) -> bool
to_pixels
fn to_pixels(self: Self, value: f64) -> f64
to_chart_values
fn to_chart_values(self: Self, pixels: f64) -> f64
measure_in_pixels
fn measure_in_pixels(self: Self, value: f64) -> f64
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.