pub struct RangeTransform {
pub direction: TransformDirection,
pub style: RangeStyle,
pub min_in: Option<f64>,
pub max_in: Option<f64>,
pub min_out: Option<f64>,
pub max_out: Option<f64>,
pub file_input_bit_depth: BitDepth,
pub file_output_bit_depth: BitDepth,
pub metadata: FormatMetadata,
}Expand description
Affine remap of [min_in, max_in] to [min_out, max_out] with optional
clamping. Each bound is optional.
Fields§
§direction: TransformDirectionThe transform direction.
style: RangeStyleWhether values are clamped to the bounds (default Clamp).
min_in: Option<f64>Lower input bound.
max_in: Option<f64>Upper input bound.
min_out: Option<f64>Lower output bound.
max_out: Option<f64>Upper output bound.
file_input_bit_depth: BitDepthInput bit depth the values were scaled for in the file.
file_output_bit_depth: BitDepthOutput bit depth the values were scaled for in the file.
metadata: FormatMetadataFormat metadata.
Implementations§
Source§impl RangeTransform
impl RangeTransform
Sourcepub fn equals(&self, other: &RangeTransform) -> bool
pub fn equals(&self, other: &RangeTransform) -> bool
Equality as defined by OCIO (RangeTransform::equals): style,
direction and bounds (with a small tolerance); metadata and file bit
depths are ignored.
Trait Implementations§
Source§impl BuildOps for RangeTransform
impl BuildOps for RangeTransform
Source§fn build_ops(
&self,
ops: &mut OpVec,
_config: &Config,
_context: &Context,
dir: TransformDirection,
) -> Result<()>
fn build_ops( &self, ops: &mut OpVec, _config: &Config, _context: &Context, dir: TransformDirection, ) -> Result<()>
Append the ops implementing
self to ops. dir is the direction
requested by the caller; implementations must combine it with the
transform’s own direction (self.direction.combine(dir)).Source§impl Clone for RangeTransform
impl Clone for RangeTransform
Source§impl Debug for RangeTransform
impl Debug for RangeTransform
Source§impl Default for RangeTransform
impl Default for RangeTransform
Source§impl From<RangeTransform> for Transform
impl From<RangeTransform> for Transform
Source§fn from(t: RangeTransform) -> Self
fn from(t: RangeTransform) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RangeTransform
impl PartialEq for RangeTransform
impl StructuralPartialEq for RangeTransform
Auto Trait Implementations§
impl Forget for RangeTransform
impl Freeze for RangeTransform
impl Move for RangeTransform
impl RefUnwindSafe for RangeTransform
impl Send for RangeTransform
impl Sync for RangeTransform
impl Unpin for RangeTransform
impl UnsafeUnpin for RangeTransform
impl UnwindSafe for RangeTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more