pub struct Shading {
pub geometry: Geometry,
pub space: Arc<ColorSpace>,
pub functions: Box<[Arc<Function>]>,
pub background: Option<Rgb>,
pub bbox: Option<Rect>,
}Expand description
A loaded, validated shading.
Fields§
§geometry: GeometryThe geometry and its parameters.
space: Arc<ColorSpace>The colour space every function’s output lands in.
functions: Box<[Arc<Function>]>The tint functions, at most four when they came from an array.
background: Option<Rgb>/Background, honoured only for a /PatternType 2 shading pattern
and never for the sh operator.
bbox: Option<Rect>/BBox, in the shading’s own space. A malformed array collapses this
to a zero rectangle, which makes the shading invisible.
Implementations§
Source§impl Shading
impl Shading
Sourcepub fn kind(&self) -> ShadingKind
pub fn kind(&self) -> ShadingKind
Which kind this is.
Sourcepub fn load<R: Resolve>(
obj: &Object,
resources: Option<&Dict>,
source: ShadingSource,
r: &R,
functions_cache: &mut FunctionCache,
limits: &Limits,
diags: &mut Diagnostics,
) -> Option<Self>
pub fn load<R: Resolve>( obj: &Object, resources: Option<&Dict>, source: ShadingSource, r: &R, functions_cache: &mut FunctionCache, limits: &Limits, diags: &mut Diagnostics, ) -> Option<Self>
Load and validate a shading.
Returns None for every condition PDFium treats as “unsupported
shading”, which paints nothing.
Trait Implementations§
impl StructuralPartialEq for Shading
Auto Trait Implementations§
impl !RefUnwindSafe for Shading
impl !UnwindSafe for Shading
impl Freeze for Shading
impl Send for Shading
impl Sync for Shading
impl Unpin for Shading
impl UnsafeUnpin for Shading
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