[−]Struct lcms2::ToneCurveRef
A borrowed reference to a ToneCurve
.
Methods
impl ToneCurveRef
[src]
pub fn reversed(&self) -> ToneCurve
[src]
Creates a tone curve that is the inverse of given tone curve.
pub fn reversed_samples(&self, samples: usize) -> ToneCurve
[src]
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.
pub fn join(&self, y: &ToneCurveRef, points: usize) -> ToneCurve
[src]
Composites two tone curves in the form Y^-1(X(t)) (self is X, the argument is Y)
pub fn is_multisegment(&self) -> bool
[src]
Returns TRUE if the tone curve contains more than one segment, FALSE if it has only one segment.
pub fn is_linear(&self) -> bool
[src]
Returns an estimation of cube being an identity (1:1) in the [0..1] domain. Does not take unbounded parts into account. This is just a coarse approximation, with no mathematical validity.
pub fn is_monotonic(&self) -> bool
[src]
Returns an estimation of monotonicity of curve in the [0..1] domain. Does not take unbounded parts into account. This is just a coarse approximation, with no mathematical validity.
pub fn is_descending(&self) -> bool
[src]
Does not take unbounded parts into account.
pub fn parametric_type(&self) -> i32
[src]
pub fn estimated_gamma(&self, precision: f64) -> Option<f64>
[src]
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.
pub fn smooth(&mut self, lambda: f64) -> bool
[src]
Smoothes tone curve according to the lambda parameter. From: Eilers, P.H.C. (1994) Smoothing and interpolation with finite differences. in: Graphic Gems IV, Heckbert, P.S. (ed.), Academic press.
pub fn estimated_entries(&self) -> &[u16]
[src]
Tone curves do maintain a shadow low-resolution tabulated representation of the curve. This function returns a pointer to this table.
pub fn eval<ToneCurveValue: FloatOrU16>(
&self,
v: ToneCurveValue
) -> ToneCurveValue
[src]
&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 AsMut<ToneCurveRef> for ToneCurve
fn as_mut(&mut self) -> &mut ToneCurveRef
impl AsRef<ToneCurveRef> for ToneCurve
fn as_ref(&self) -> &ToneCurveRef
impl ToOwned for ToneCurveRef
type Owned = ToneCurve
The resulting type after obtaining ownership.
fn to_owned(&self) -> ToneCurve
fn clone_into(&self, target: &mut Self::Owned)
[src]
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl Debug for ToneCurveRef
[src]
impl BorrowMut<ToneCurveRef> for ToneCurve
fn borrow_mut(&mut self) -> &mut ToneCurveRef
impl Borrow<ToneCurveRef> for ToneCurve
fn borrow(&self) -> &ToneCurveRef
impl ForeignTypeRef for ToneCurveRef
type CType = ToneCurve
The raw C type.
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
[src]
Constructs a shared instance of this type from its raw type.
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
[src]
Constructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType
[src]
Returns a raw pointer to the wrapped value.
Auto Trait Implementations
impl !Send for ToneCurveRef
impl Unpin for ToneCurveRef
impl !Sync for ToneCurveRef
impl UnwindSafe for ToneCurveRef
impl !RefUnwindSafe for ToneCurveRef
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,