#[non_exhaustive]pub enum Pattern {
Tiling(Box<TilingPattern>),
Shading(Box<ShadingPattern>),
}Expand description
A loaded pattern.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Tiling(Box<TilingPattern>)
/PatternType 1: a content stream tiled across the fill.
Shading(Box<ShadingPattern>)
/PatternType 2: a shading painted across the fill.
Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn load<R: Resolve>(
obj: &Object,
parent_matrix: Affine,
resources: Option<&Dict>,
r: &R,
functions: &mut FunctionCache,
limits: &Limits,
diags: &mut Diagnostics,
) -> Option<Self>
pub fn load<R: Resolve>( obj: &Object, parent_matrix: Affine, resources: Option<&Dict>, r: &R, functions: &mut FunctionCache, limits: &Limits, diags: &mut Diagnostics, ) -> Option<Self>
Load a pattern from the object a /Pattern resource names.
parent_matrix is the form’s or page’s coordinate system, not the
current transformation matrix. Dispatch is on /PatternType: 1 is
tiling, 2 is shading, and anything else — including a missing key —
yields no pattern at all.
There is no pattern cache. A pattern is loaded afresh at each use,
so the parent_matrix a use is given is the one it gets.
Trait Implementations§
impl StructuralPartialEq for Pattern
Auto Trait Implementations§
impl !RefUnwindSafe for Pattern
impl !UnwindSafe for Pattern
impl Freeze for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
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