Struct pdf_writer::writers::IccProfile
source · pub struct IccProfile<'a> { /* private fields */ }
Expand description
Writer for an ICC profile stream.
This struct is created by Chunk::icc_profile
.
Implementations§
source§impl<'a> IccProfile<'a>
impl<'a> IccProfile<'a>
sourcepub fn n(&mut self, n: i32) -> &mut Self
pub fn n(&mut self, n: i32) -> &mut Self
Write the /N
attribute. Required.
The number of components in the color space. Shall be 1, 3, or 4.
sourcepub fn alternate(&mut self) -> ColorSpace<'_>
pub fn alternate(&mut self) -> ColorSpace<'_>
Write the /Alternate
attribute with a color space.
The alternate color space to use when the ICC profile is not supported. Must be a color space with the same number of components as the ICC profile. Pattern color spaces are not allowed.
sourcepub fn alternate_name(&mut self, name: Name<'_>) -> &mut Self
pub fn alternate_name(&mut self, name: Name<'_>) -> &mut Self
Write the /Alternate
attribute with a name.
The alternate color space referenced by name must be registered in the current resource dictionary.
sourcepub fn range(&mut self, range: impl IntoIterator<Item = f32>) -> &mut Self
pub fn range(&mut self, range: impl IntoIterator<Item = f32>) -> &mut Self
Write the /Range
attribute.
Specifies the permissible range of values for each component. The array
shall contain 2 × N
numbers, where N
is the number of
components in the color space. The array is organized in pairs, where
the first value shall be the minimum value and the second shall be the
maximum value.
sourcepub fn metadata(&mut self, metadata: Ref) -> &mut Self
pub fn metadata(&mut self, metadata: Ref) -> &mut Self
Write the /Metadata
attribute.
A reference to a stream containing metadata for the ICC profile.
Methods from Deref<Target = Stream<'a>>§
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.