pub struct DeviceN<'a> { /* private fields */ }
Expand description
Writer for a DeviceN color space array with attributes. PDF 1.6+.
First, one of the alternate_...
methods must be called to specify the
alternate color space. Then, one of the tint_...
methods must be called to
specify the tint transform method. Finally, the attrs
function may
optionally be called. If any function is called out of order, the function
panics.
This struct is created by ColorSpace::device_n
.
Implementations§
source§impl<'a> DeviceN<'a>
impl<'a> DeviceN<'a>
sourcepub fn alternate_device(&mut self, device_space: DeviceColorSpace) -> &mut Self
pub fn alternate_device(&mut self, device_space: DeviceColorSpace) -> &mut Self
Write the alternateSpace
element as a device color space.
sourcepub fn alternate_color_space(&mut self) -> ColorSpace<'_>
pub fn alternate_color_space(&mut self) -> ColorSpace<'_>
Start writing the alternateSpace
element as a color space array. The
color space must not be another Pattern
, Separation
, or DeviceN
color space.
sourcepub fn alternate_color_space_ref(&mut self, id: Ref) -> &mut Self
pub fn alternate_color_space_ref(&mut self, id: Ref) -> &mut Self
Write the alternateSpace
element as an indirect reference. The color
space must not be another Pattern
, Separation
, or DeviceN
color
space.
sourcepub fn tint_exponential(&mut self) -> ExponentialFunction<'_>
pub fn tint_exponential(&mut self) -> ExponentialFunction<'_>
Start writing the tintTransform
element as an exponential
interpolation function.
sourcepub fn tint_stitching(&mut self) -> StitchingFunction<'_>
pub fn tint_stitching(&mut self) -> StitchingFunction<'_>
Start writing the tintTransform
element as a stitching function.
sourcepub fn tint_ref(&mut self, id: Ref) -> &mut Self
pub fn tint_ref(&mut self, id: Ref) -> &mut Self
Write the tintTransform
element as an indirect reference to a
function. The function must take n numbers as input and produce a color
in the alternate color space as output. This must be used if a stream
function like SampledFunction
or PostScriptFunction
is used.
sourcepub fn attrs(&mut self) -> DeviceNAttrs<'_>
pub fn attrs(&mut self) -> DeviceNAttrs<'_>
Start writing the attrs
dictionary. PDF 1.6+.