[−][src]Trait prisma::encoding::TranscodableColor
A color that can have its encoding changed
Because of the non-linear nature of encodings, only Rgb can have its encoding changed. The other
device-dependent colors can come from an encoding, and may be stored in EncodedColor
, but
they must go through Rgb for that encoding to change.
Associated Types
type IntermediateColor
The color type used internally to do conversions. This will always have floating-point channels
Required methods
fn encode_color<Encoder>(self, enc: &Encoder) -> Self where
Encoder: ChannelEncoder,
Encoder: ChannelEncoder,
Encode self
using the encoder enc
fn decode_color<Decoder>(self, dec: &Decoder) -> Self where
Decoder: ChannelDecoder,
Decoder: ChannelDecoder,
Decode self
using the decoder dec
Implementors
impl<T> TranscodableColor for Rgb<T> where
T: PosNormalChannelScalar + ChannelFormatCast<f64>,
f64: ChannelFormatCast<T>,
[src]
T: PosNormalChannelScalar + ChannelFormatCast<f64>,
f64: ChannelFormatCast<T>,
type IntermediateColor = Rgb<f64>
fn encode_color<Encoder>(self, enc: &Encoder) -> Self where
Encoder: ChannelEncoder,
[src]
Encoder: ChannelEncoder,
fn decode_color<Decoder>(self, dec: &Decoder) -> Self where
Decoder: ChannelDecoder,
[src]
Decoder: ChannelDecoder,
impl<T> TranscodableColor for Rgba<T> where
T: PosNormalChannelScalar + ChannelFormatCast<f64>,
f64: ChannelFormatCast<T>,
[src]
T: PosNormalChannelScalar + ChannelFormatCast<f64>,
f64: ChannelFormatCast<T>,
type IntermediateColor = Rgba<f64>
fn encode_color<Encoder>(self, enc: &Encoder) -> Self where
Encoder: ChannelEncoder,
[src]
Encoder: ChannelEncoder,
fn decode_color<Decoder>(self, dec: &Decoder) -> Self where
Decoder: ChannelDecoder,
[src]
Decoder: ChannelDecoder,