pub struct ExponentialFunction<'a> { /* private fields */ }
Expand description
Writer for an exponential 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::exponential_function
and
writers::Separation::tint_exponential
.
Implementations§
source§impl<'a> ExponentialFunction<'a>
impl<'a> ExponentialFunction<'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 c0(&mut self, c0: impl IntoIterator<Item = f32>) -> &mut Self
pub fn c0(&mut self, c0: impl IntoIterator<Item = f32>) -> &mut Self
Write the /C0
array.
Function result when input is zero. Default is 0.0
.
sourcepub fn c1(&mut self, c1: impl IntoIterator<Item = f32>) -> &mut Self
pub fn c1(&mut self, c1: impl IntoIterator<Item = f32>) -> &mut Self
Write the /C1
array.
Function result when input is one. Default is 1.0
.
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.
Trait Implementations§
source§impl<'a> Deref for ExponentialFunction<'a>
impl<'a> Deref for ExponentialFunction<'a>
source§impl<'a> DerefMut for ExponentialFunction<'a>
impl<'a> DerefMut for ExponentialFunction<'a>
source§impl<'a, 'any> Rewrite<'a> for ExponentialFunction<'any>
impl<'a, 'any> Rewrite<'a> for ExponentialFunction<'any>
source§type Output = ExponentialFunction<'a>
type Output = ExponentialFunction<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for ExponentialFunction<'a>
impl<'a> RefUnwindSafe for ExponentialFunction<'a>
impl<'a> Send for ExponentialFunction<'a>
impl<'a> Sync for ExponentialFunction<'a>
impl<'a> Unpin for ExponentialFunction<'a>
impl<'a> !UnwindSafe for ExponentialFunction<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more