Struct lcms2::ToneCurveRef
[−]
pub struct ToneCurveRef(_);
Methods
impl ToneCurveRef
[src]
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 ForeignTypeRef for ToneCurveRef
type CType = ToneCurve
The raw C type.
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type.
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
Constructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType
Returns a raw pointer to the wrapped value.