Struct lcms2::ToneCurve
[−]
pub struct ToneCurve(_);
Methods
impl ToneCurve
[src]
fn new(gamma: f64) -> Self
fn new_tabulated(values: &[u16]) -> Self
fn new_tabulated_float(values: &[f32]) -> Self
Methods from Deref<Target = ToneCurveRef>
fn reversed(&self) -> ToneCurve
Creates a tone curve that is the inverse of given tone curve.
fn reversed_samples(&self, samples: usize) -> ToneCurve
Creates a tone curve that is the inverse of given tone curve. In the case it couldn’t be analytically reversed, a tablulated curve of nResultSamples is created.
fn join(&self, y: &ToneCurveRef, points: usize) -> ToneCurve
Composites two tone curves in the form Y-1(X(t)) (self is X, the argument is Y)
fn is_multisegment(&self) -> bool
fn is_linear(&self) -> bool
fn is_monotonic(&self) -> bool
fn is_descending(&self) -> bool
fn parametric_type(&self) -> i32
fn estimated_gamma(&self, precision: f64) -> Option<f64>
Estimates the apparent gamma of the tone curve by using least squares fitting. Precision: The maximum standard deviation allowed on the residuals, 0.01 is a fair value, set it to a big number to fit any curve, mo matter how good is the fit.
fn smooth(&mut self, lambda: f64) -> bool
fn estimated_entries(&self) -> &[u16]
fn eval<ToneCurveValue: FloatOrU16>(&self, v: ToneCurveValue) -> ToneCurveValue
Evaluates the given number (u16 or f32) across the given tone curve.
This function is significantly faster for u16, since it uses a pre-computed 16-bit lookup table.
Trait Implementations
impl ForeignType for ToneCurve
type CType = ToneCurve
The raw C type.
type Ref = ToneCurveRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut ToneCurve) -> ToneCurve
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut ToneCurve
Returns a raw pointer to the wrapped value.
impl Drop for ToneCurve
impl Deref for ToneCurve
type Target = ToneCurveRef
The resulting type after dereferencing
fn deref(&self) -> &ToneCurveRef
The method called to dereference a value
impl DerefMut for ToneCurve
fn deref_mut(&mut self) -> &mut ToneCurveRef
The method called to mutably dereference a value
impl Clone for ToneCurve
[src]
fn clone(&self) -> ToneCurve
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more