pub struct StitchingFunction<'a> { /* private fields */ }
Expand description
Writer for a stitching function dictionary. PDF 1.3+.
The function result is y_i = C0_i + x^N * (C1_i - C0_i)
where i
is the
current dimension.
This struct is created by Chunk::stitching_function
and
writers::Separation::tint_stitching
.
Implementations§
source§impl<'a> StitchingFunction<'a>
impl<'a> StitchingFunction<'a>
sourcepub fn domain(&mut self, domain: impl IntoIterator<Item = f32>) -> &mut Self
pub fn domain(&mut self, domain: impl IntoIterator<Item = f32>) -> &mut Self
Write the /Domain
attribute to set where the function is defined.
Required.
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.
Required for sampled and PostScript functions.
sourcepub fn functions(
&mut self,
functions: impl IntoIterator<Item = Ref>,
) -> &mut Self
pub fn functions( &mut self, functions: impl IntoIterator<Item = Ref>, ) -> &mut Self
Write the /Functions
array.
The functions to be stitched. Required.
sourcepub fn bounds(&mut self, bounds: impl IntoIterator<Item = f32>) -> &mut Self
pub fn bounds(&mut self, bounds: impl IntoIterator<Item = f32>) -> &mut Self
Write the /Bounds
array.
The boundaries of the intervals that each function is called in. The array has one less entry than there are stiched functions. Required.
sourcepub fn encode(&mut self, encode: impl IntoIterator<Item = f32>) -> &mut Self
pub fn encode(&mut self, encode: impl IntoIterator<Item = f32>) -> &mut Self
Write the /Encode
array.
Pair of values for each function that maps the stitching domain subsets to the function domain. Required.
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.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.