pub enum ResolvedColorSpace {
DeviceGray,
DeviceRGB,
DeviceCMYK,
ICCBased {
num_components: u32,
alternate: Box<ResolvedColorSpace>,
},
Indexed {
base: Box<ResolvedColorSpace>,
hival: u32,
lookup_table: Vec<u8>,
},
Separation {
alternate: Box<ResolvedColorSpace>,
},
DeviceN {
num_components: u32,
alternate: Box<ResolvedColorSpace>,
},
}Expand description
A resolved PDF color space with enough information to convert
component values to a Color.
Variants§
DeviceGray
DeviceGray (1 component).
DeviceRGB
DeviceRGB (3 components).
DeviceCMYK
DeviceCMYK (4 components).
ICCBased
ICCBased color space: stores the number of components and the alternate color space to use for conversion.
Fields
alternate: Box<ResolvedColorSpace>Alternate color space for fallback conversion.
Indexed
Indexed color space: a palette-based color space.
Fields
base: Box<ResolvedColorSpace>Base color space that palette entries are specified in.
Separation
Separation color space (single-component spot color). Best-effort: uses the alternate color space.
Fields
alternate: Box<ResolvedColorSpace>Alternate color space (fallback).
DeviceN
DeviceN color space (multi-component named colors). Best-effort: uses the alternate color space.
Fields
alternate: Box<ResolvedColorSpace>Alternate color space (fallback).
Implementations§
Source§impl ResolvedColorSpace
impl ResolvedColorSpace
Sourcepub fn num_components(&self) -> u32
pub fn num_components(&self) -> u32
Number of components expected for this color space.
Sourcepub fn resolve_color(&self, components: &[f32]) -> Color
pub fn resolve_color(&self, components: &[f32]) -> Color
Convert color components to a Color value using this color space.
Trait Implementations§
Source§impl Clone for ResolvedColorSpace
impl Clone for ResolvedColorSpace
Source§fn clone(&self) -> ResolvedColorSpace
fn clone(&self) -> ResolvedColorSpace
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more