Skip to main content

RangeTransform

Struct RangeTransform 

Source
pub struct RangeTransform { /* private fields */ }
Expand description

Clamps and rescales numeric ranges between input and output domains.

Implementations§

Source§

impl RangeTransform

Source

pub fn create() -> Result<Self>

Create a new identity range transform.

Source

pub fn style(&self) -> RangeStyle

Return the current range style.

Source

pub fn set_style(&self, style: RangeStyle)

Set the range style.

Source

pub fn try_set_style(&self, style: RangeStyle) -> Result<()>

Set the range style and surface any OCIO validation error.

Source

pub fn min_in_value(&self) -> f64

Return the minimum input value.

Source

pub fn set_min_in_value(&self, value: f64)

Set the minimum input value.

Source

pub fn try_set_min_in_value(&self, value: f64) -> Result<()>

Set the minimum input endpoint and surface any OCIO validation error.

Source

pub fn max_in_value(&self) -> f64

Return the maximum input value.

Source

pub fn set_max_in_value(&self, value: f64)

Set the maximum input value.

Source

pub fn try_set_max_in_value(&self, value: f64) -> Result<()>

Set the maximum input endpoint and surface any OCIO validation error.

Source

pub fn min_out_value(&self) -> f64

Return the minimum output value.

Source

pub fn set_min_out_value(&self, value: f64)

Set the minimum output value.

Source

pub fn try_set_min_out_value(&self, value: f64) -> Result<()>

Set the minimum output endpoint and surface any OCIO validation error.

Source

pub fn max_out_value(&self) -> f64

Return the maximum output value.

Source

pub fn set_max_out_value(&self, value: f64)

Set the maximum output value.

Source

pub fn try_set_max_out_value(&self, value: f64) -> Result<()>

Set the maximum output endpoint and surface any OCIO validation error.

Source

pub fn direction(&self) -> TransformDirection

Return the transform direction.

Source

pub fn set_direction(&self, direction: TransformDirection)

Set the transform direction.

Source

pub fn try_set_direction(&self, direction: TransformDirection) -> Result<()>

Set the transform direction and surface any OCIO validation error.

Source

pub fn create_editable_copy(&self) -> Result<Self>

Create an independent copy of this transform.

Source

pub fn has_min_in_value(&self) -> bool

Return whether the minimum input value is set.

Source

pub fn unset_min_in_value(&self)

Unset the minimum input value.

Source

pub fn try_unset_min_in_value(&self) -> Result<()>

Unset the minimum input endpoint and surface any OCIO validation error.

Source

pub fn has_max_in_value(&self) -> bool

Return whether the maximum input value is set.

Source

pub fn unset_max_in_value(&self)

Unset the maximum input value.

Source

pub fn try_unset_max_in_value(&self) -> Result<()>

Unset the maximum input endpoint and surface any OCIO validation error.

Source

pub fn has_min_out_value(&self) -> bool

Return whether the minimum output value is set.

Source

pub fn unset_min_out_value(&self)

Unset the minimum output value.

Source

pub fn try_unset_min_out_value(&self) -> Result<()>

Unset the minimum output endpoint and surface any OCIO validation error.

Source

pub fn has_max_out_value(&self) -> bool

Return whether the maximum output value is set.

Source

pub fn unset_max_out_value(&self)

Unset the maximum output value.

Source

pub fn try_unset_max_out_value(&self) -> Result<()>

Unset the maximum output endpoint and surface any OCIO validation error.

Source

pub fn file_input_bit_depth(&self) -> BitDepth

Return the bit depth declared for file-based input serialization.

Source

pub fn set_file_input_bit_depth(&self, bit_depth: BitDepth)

Set the serialized input bit depth.

Source

pub fn try_set_file_input_bit_depth(&self, bit_depth: BitDepth) -> Result<()>

Set the serialized input bit depth and surface any OCIO validation error.

Source

pub fn file_output_bit_depth(&self) -> BitDepth

Return the bit depth declared for file-based output serialization.

Source

pub fn set_file_output_bit_depth(&self, bit_depth: BitDepth)

Set the serialized output bit depth.

Source

pub fn try_set_file_output_bit_depth(&self, bit_depth: BitDepth) -> Result<()>

Set the serialized output bit depth and surface any OCIO validation error.

Source

pub fn format_metadata(&self) -> Option<FormatMetadata>

Return format metadata attached to the transform, when available.

Source

pub fn format_metadata_v1(&self) -> Option<FormatMetadata>

👎Deprecated since 0.2.0:

compat alias; prefer format_metadata()

Source

pub fn format_metadata_v2(&self) -> Option<FormatMetadata>

👎Deprecated since 0.2.0:

compat alias; prefer format_metadata()

Source

pub fn equals(&self, other: &Self) -> bool

Return whether this transform is equivalent to other.

Trait Implementations§

Source§

impl Drop for RangeTransform

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl TransformHandle for RangeTransform

Source§

fn as_ptr(&self) -> *mut c_void

Source§

fn diagnostic_text(&self) -> Result<String>

Return OCIO’s diagnostic representation, which may include file paths. This text is not a stable interchange format.
Source§

fn try_type_tag(&self) -> Result<i32>

Return the version-independent tag corresponding to crate::TransformType.
Source§

fn try_set_direction(&mut self, direction: TransformDirection) -> Result<()>

Change the native evaluation direction without modifying the stored parameters.
Source§

fn try_validate(&self) -> Result<()>

Validate the native transform without copying it or building a processor.
Source§

fn try_create_editable_copy(&self) -> Result<Transform>

Create a native editable copy, preserving the concrete transform type. A copied group shares its children with the original. For an independent built-in group graph, use GroupTransform::create_deep_copy.
Source§

fn try_direction(&self) -> Result<TransformDirection>

Query the native direction with validation, for any supported transform.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.