pub struct ShadingPattern<'a> { /* private fields */ }
Expand description
Writer for a shading pattern dictionary. PDF 1.3+.
This struct is created by Chunk::shading_pattern
.
Implementations§
source§impl<'a> ShadingPattern<'a>
impl<'a> ShadingPattern<'a>
sourcepub fn function_shading(&mut self) -> FunctionShading<'_>
pub fn function_shading(&mut self) -> FunctionShading<'_>
Start writing the /Shading
dictionary for a type 1, 2, or 3 shading.
sourcepub fn shading_ref(&mut self, id: Ref) -> &mut Self
pub fn shading_ref(&mut self, id: Ref) -> &mut Self
Add an indirect reference to a /Shading
dictionary or a shading stream.
sourcepub fn matrix(&mut self, matrix: [f32; 6]) -> &mut Self
pub fn matrix(&mut self, matrix: [f32; 6]) -> &mut Self
Write the /Matrix
attribute.
Sets the matrix to use for the pattern. Defaults to the identity matrix.
sourcepub fn ext_graphics(&mut self) -> ExtGraphicsState<'_>
pub fn ext_graphics(&mut self) -> ExtGraphicsState<'_>
Start writing the /ExtGState
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 ShadingPattern<'a>
impl<'a> Deref for ShadingPattern<'a>
source§impl<'a> DerefMut for ShadingPattern<'a>
impl<'a> DerefMut for ShadingPattern<'a>
source§impl<'a, 'any> Rewrite<'a> for ShadingPattern<'any>
impl<'a, 'any> Rewrite<'a> for ShadingPattern<'any>
source§type Output = ShadingPattern<'a>
type Output = ShadingPattern<'a>
The writer with the rewritten lifetime.
Auto Trait Implementations§
impl<'a> Freeze for ShadingPattern<'a>
impl<'a> RefUnwindSafe for ShadingPattern<'a>
impl<'a> Send for ShadingPattern<'a>
impl<'a> Sync for ShadingPattern<'a>
impl<'a> Unpin for ShadingPattern<'a>
impl<'a> !UnwindSafe for ShadingPattern<'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