pub struct ShadingManager { /* private fields */ }Expand description
Shading manager for handling multiple shadings
Implementations§
Source§impl ShadingManager
impl ShadingManager
Sourcepub fn add_shading(&mut self, shading: ShadingDefinition) -> Result<String>
pub fn add_shading(&mut self, shading: ShadingDefinition) -> Result<String>
Add a shading
Sourcepub fn add_shading_pattern(&mut self, pattern: ShadingPattern) -> Result<String>
pub fn add_shading_pattern(&mut self, pattern: ShadingPattern) -> Result<String>
Add a shading pattern
Sourcepub fn get_shading(&self, name: &str) -> Option<&ShadingDefinition>
pub fn get_shading(&self, name: &str) -> Option<&ShadingDefinition>
Get a shading by name
Sourcepub fn get_pattern(&self, name: &str) -> Option<&ShadingPattern>
pub fn get_pattern(&self, name: &str) -> Option<&ShadingPattern>
Get a shading pattern by name
Sourcepub fn shadings(&self) -> &HashMap<String, ShadingDefinition>
pub fn shadings(&self) -> &HashMap<String, ShadingDefinition>
Get all shadings
Sourcepub fn patterns(&self) -> &HashMap<String, ShadingPattern>
pub fn patterns(&self) -> &HashMap<String, ShadingPattern>
Get all patterns
Sourcepub fn shading_count(&self) -> usize
pub fn shading_count(&self) -> usize
Count of registered shadings
Sourcepub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Count of registered patterns
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Total count of all items
Sourcepub fn create_linear_gradient(
&mut self,
start_point: Point,
end_point: Point,
start_color: Color,
end_color: Color,
) -> Result<String>
pub fn create_linear_gradient( &mut self, start_point: Point, end_point: Point, start_color: Color, end_color: Color, ) -> Result<String>
Create a simple linear gradient
Sourcepub fn create_radial_gradient(
&mut self,
center: Point,
start_radius: f64,
end_radius: f64,
start_color: Color,
end_color: Color,
) -> Result<String>
pub fn create_radial_gradient( &mut self, center: Point, start_radius: f64, end_radius: f64, start_color: Color, end_color: Color, ) -> Result<String>
Create a simple radial gradient
Sourcepub fn to_resource_dictionary(&self) -> Result<String>
pub fn to_resource_dictionary(&self) -> Result<String>
Generate shading resource dictionary for PDF
Trait Implementations§
Source§impl Clone for ShadingManager
impl Clone for ShadingManager
Source§fn clone(&self) -> ShadingManager
fn clone(&self) -> ShadingManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShadingManager
impl Debug for ShadingManager
Auto Trait Implementations§
impl Freeze for ShadingManager
impl RefUnwindSafe for ShadingManager
impl Send for ShadingManager
impl Sync for ShadingManager
impl Unpin for ShadingManager
impl UnwindSafe for ShadingManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().