[][src]Struct prisma::color_space::EncodedColorSpace

pub struct EncodedColorSpace<T, E> { /* fields omitted */ }

A color space that also contains an encoding for device-dependent colors

Implementations

impl<T, E> EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

pub fn new(
    red: RgbPrimary<T>,
    green: RgbPrimary<T>,
    blue: RgbPrimary<T>,
    white_point: Xyz<T>,
    encoding: E
) -> Self
[src]

Construct a new EncodedColorSpace from primaries, a white point and an encoding

pub fn new_with_transforms(
    red: RgbPrimary<T>,
    green: RgbPrimary<T>,
    blue: RgbPrimary<T>,
    white_point: Xyz<T>,
    encoding: E,
    xyz_transform: Matrix3<T>,
    inv_transform: Matrix3<T>
) -> Self
[src]

Construct a new EncodedColorSpace from primaries, a white point and an encoding as well as transformation matrices

This does not verify the correctness of the transformation matricies, so only use it if you are positive. Provided as a potential optimization to skip the building step.

pub fn encoding(&self) -> &E[src]

Returns a reference to the EncodedColorSpace's encoding

pub fn with_encoding<EOut>(&self, encoding: EOut) -> EncodedColorSpace<T, EOut>[src]

Returns a copy of this EncodedColorSpace with a different encoding

impl<T> EncodedColorSpace<T, LinearEncoding> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar
[src]

pub fn new_linear_color_space(
    red: RgbPrimary<T>,
    green: RgbPrimary<T>,
    blue: RgbPrimary<T>,
    white_point: Xyz<T>
) -> EncodedColorSpace<T, LinearEncoding>
[src]

Construct a new linear color space

Trait Implementations

impl<T, E> ChannelDecoder for EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<'a, T, E> ChannelDecoder for &'a EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<'a, T, E> ChannelDecoder for &'a mut EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<T, E> ChannelEncoder for EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<'a, T, E> ChannelEncoder for &'a EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<'a, T, E> ChannelEncoder for &'a mut EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<T: Clone, E: Clone> Clone for EncodedColorSpace<T, E>[src]

impl<T, E> ColorEncoding for EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<'a, T, E> ColorEncoding for &'a EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

impl<T, E> ColorSpace<T> for EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

type Encoding = E

The standard encoding used by this color space

impl<'a, T, E> ColorSpace<T> for &'a EncodedColorSpace<T, E> where
    T: Float + FreeChannelScalar + PosNormalChannelScalar,
    E: ColorEncoding
[src]

type Encoding = E

The standard encoding used by this color space

impl<T, E> ConvertFromXyz<T, Xyz<T>> for EncodedColorSpace<T, E> where
    T: PosNormalChannelScalar + FreeChannelScalar + ChannelFormatCast<f64>,
    f64: ChannelFormatCast<T>,
    E: ColorEncoding + PartialEq + Clone
[src]

type OutputColor = Rgb<T>

The color type converted to.

impl<T, E, EIn> ConvertToXyz<T, Alpha<T, Rgb<T>>, EIn> for EncodedColorSpace<T, E> where
    T: PosNormalChannelScalar + FreeChannelScalar + Float + ChannelFormatCast<f64>,
    f64: ChannelFormatCast<T>,
    E: ColorEncoding + PartialEq,
    EIn: ColorEncoding + PartialEq
[src]

type OutputColor = Xyza<T>

The type to output. Always some form of Xyz

impl<'a, T, E, EIn> ConvertToXyz<T, Alpha<T, Rgb<T>>, EIn> for &'a EncodedColorSpace<T, E> where
    T: PosNormalChannelScalar + FreeChannelScalar + Float + ChannelFormatCast<f64>,
    f64: ChannelFormatCast<T>,
    E: ColorEncoding + PartialEq,
    EIn: ColorEncoding + PartialEq
[src]

type OutputColor = Xyza<T>

The type to output. Always some form of Xyz

impl<T, E, EIn> ConvertToXyz<T, Rgb<T>, EIn> for EncodedColorSpace<T, E> where
    T: PosNormalChannelScalar + FreeChannelScalar + Float + ChannelFormatCast<f64>,
    f64: ChannelFormatCast<T>,
    E: ColorEncoding + PartialEq,
    EIn: ColorEncoding + PartialEq
[src]

type OutputColor = Xyz<T>

The type to output. Always some form of Xyz

impl<'a, T, E, EIn> ConvertToXyz<T, Rgb<T>, EIn> for &'a EncodedColorSpace<T, E> where
    T: PosNormalChannelScalar + FreeChannelScalar + Float + ChannelFormatCast<f64>,
    f64: ChannelFormatCast<T>,
    E: ColorEncoding + PartialEq,
    EIn: ColorEncoding + PartialEq
[src]

type OutputColor = Xyz<T>

The type to output. Always some form of Xyz

impl<T: Debug, E: Debug> Debug for EncodedColorSpace<T, E>[src]

impl<T: PartialEq, E: PartialEq> PartialEq<EncodedColorSpace<T, E>> for EncodedColorSpace<T, E>[src]

impl<T, E> StructuralPartialEq for EncodedColorSpace<T, E>[src]

Auto Trait Implementations

impl<T, E> RefUnwindSafe for EncodedColorSpace<T, E> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, E> Send for EncodedColorSpace<T, E> where
    E: Send,
    T: Send

impl<T, E> Sync for EncodedColorSpace<T, E> where
    E: Sync,
    T: Sync

impl<T, E> Unpin for EncodedColorSpace<T, E> where
    E: Unpin,
    T: Unpin

impl<T, E> UnwindSafe for EncodedColorSpace<T, E> where
    E: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.