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