pub struct PostScriptFunction<'a> { /* private fields */ }
Expand description
Writer for a PostScript function stream. PDF 1.3+.
This struct is created by Chunk::post_script_function
.
Implementations§
source§impl<'a> PostScriptFunction<'a>
impl<'a> PostScriptFunction<'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.
Methods from Deref<Target = Stream<'a>>§
sourcepub fn decode_parms(&mut self) -> DecodeParms<'_>
pub fn decode_parms(&mut self) -> DecodeParms<'_>
Start writing the /DecodeParms
attribute.
This is a dictionary that specifies parameters to be used in decoding
the stream data using the filter specified by the
/Filter
attribute.
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 PostScriptFunction<'a>
impl<'a> Deref for PostScriptFunction<'a>
Auto Trait Implementations§
impl<'a> Freeze for PostScriptFunction<'a>
impl<'a> RefUnwindSafe for PostScriptFunction<'a>
impl<'a> Send for PostScriptFunction<'a>
impl<'a> Sync for PostScriptFunction<'a>
impl<'a> Unpin for PostScriptFunction<'a>
impl<'a> !UnwindSafe for PostScriptFunction<'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