[−][src]Struct pix::Ch16
16-bit color Channel
The Channel
is represented by a u16
, but multiplication and division
treat values as though they range between 0 and 1.
let c: Ch16 = std::u16::MIN.into(); assert_eq!(c, Ch16::MIN); let c: Ch8 = c.into(); assert_eq!(c, Ch8::MIN); let c: Ch16 = std::u16::MAX.into(); assert_eq!(c, Ch16::MAX); let c: Ch32 = c.into(); assert_eq!(c, Ch32::MAX);
Methods
impl Ch16
[src]
Trait Implementations
impl Channel for Ch16
[src]
const MIN: Ch16
[src]
Minimum intensity (zero)
const MAX: Ch16
[src]
Maximum intensity (one)
fn powf(self, g: f32) -> Self
[src]
Raise to given power
impl Clone for Ch16
[src]
impl Copy for Ch16
[src]
impl Debug for Ch16
[src]
impl Default for Ch16
[src]
impl<R> Div<R> for Ch16 where
Self: From<R>,
[src]
Self: From<R>,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: R) -> Self
[src]
impl Div<f32> for Ch16
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: f32) -> Self
[src]
impl Eq for Ch16
[src]
impl From<Ch16> for u16
[src]
impl From<Ch16> for Ch8
[src]
impl From<Ch16> for Ch32
[src]
impl From<Ch32> for Ch16
[src]
impl From<Ch8> for Ch16
[src]
impl<C: Channel> From<Opaque<C>> for Ch16
[src]
impl From<u16> for Ch16
[src]
impl<R> Mul<R> for Ch16 where
Self: From<R>,
[src]
Self: From<R>,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: R) -> Self
[src]
impl Mul<f32> for Ch16
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self
[src]
impl Ord for Ch16
[src]
fn cmp(&self, other: &Ch16) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Ch16> for Ch16
[src]
impl PartialOrd<Ch16> for Ch16
[src]
fn partial_cmp(&self, other: &Ch16) -> Option<Ordering>
[src]
fn lt(&self, other: &Ch16) -> bool
[src]
fn le(&self, other: &Ch16) -> bool
[src]
fn gt(&self, other: &Ch16) -> bool
[src]
fn ge(&self, other: &Ch16) -> bool
[src]
impl StructuralEq for Ch16
[src]
impl StructuralPartialEq for Ch16
[src]
impl<R> Sub<R> for Ch16 where
Self: From<R>,
[src]
Self: From<R>,
Auto Trait Implementations
impl RefUnwindSafe for Ch16
impl Send for Ch16
impl Sync for Ch16
impl Unpin for Ch16
impl UnwindSafe for Ch16
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &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> 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, 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>,