Struct pdf_writer::writers::StitchingFunction
source · [−]pub struct StitchingFunction<'a> { /* private fields */ }
Expand description
Writer for a stitching function dictionary.
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 PdfWriter::stitching_function
.
Implementations
sourceimpl<'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>>
Trait Implementations
sourceimpl<'a> Deref for StitchingFunction<'a>
impl<'a> Deref for StitchingFunction<'a>
sourceimpl<'a> DerefMut for StitchingFunction<'a>
impl<'a> DerefMut for StitchingFunction<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for StitchingFunction<'a>
impl<'a> Send for StitchingFunction<'a>
impl<'a> Sync for StitchingFunction<'a>
impl<'a> Unpin for StitchingFunction<'a>
impl<'a> !UnwindSafe for StitchingFunction<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more