pub struct Separation<'a> { /* private fields */ }
Expand description
Writer for a separation dictionary. PDF 1.2+.
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. If the tint transform method is
called before the alternate color space, the function panics. If multiple
alternate color space functions are called, the function panics.
This struct is created by ColorSpace::separation
.
Implementations§
source§impl<'a> Separation<'a>
impl<'a> Separation<'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 a single number 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.