pub struct ShadowConfig { /* private fields */ }Expand description
Shadow rendering configuration for drop shadow effects on canvas primitives.
When applied, all subsequent fill, stroke, and draw operations will cast a shadow with the specified color, blur radius, and offset.
Implementations§
Source§impl ShadowConfig
Implements construction methods for ShadowConfig.
impl ShadowConfig
Implements construction methods for ShadowConfig.
Sourcepub fn create() -> ShadowConfig
pub fn create() -> ShadowConfig
Creates a shadow configuration with default values.
§Returns
ShadowConfig- The default shadow configuration.
Source§impl ShadowConfig
impl ShadowConfig
pub fn get_color(&self) -> String
pub fn get_mut_color(&mut self) -> &mut String
pub fn set_color(&mut self, val: String) -> &mut Self
pub fn get_blur(&self) -> f64
pub fn get_mut_blur(&mut self) -> &mut f64
pub fn set_blur(&mut self, val: f64) -> &mut Self
pub fn get_offset_x(&self) -> f64
pub fn get_mut_offset_x(&mut self) -> &mut f64
pub fn set_offset_x(&mut self, val: f64) -> &mut Self
pub fn get_offset_y(&self) -> f64
pub fn get_mut_offset_y(&mut self) -> &mut f64
pub fn set_offset_y(&mut self, val: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for ShadowConfig
impl Clone for ShadowConfig
Source§fn clone(&self) -> ShadowConfig
fn clone(&self) -> ShadowConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ShadowConfig
impl Debug for ShadowConfig
Source§impl Default for ShadowConfig
Implements Default for ShadowConfig with default shadow values.
impl Default for ShadowConfig
Implements Default for ShadowConfig with default shadow values.
Source§fn default() -> ShadowConfig
fn default() -> ShadowConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for ShadowConfig
impl PartialEq for ShadowConfig
Source§fn eq(&self, other: &ShadowConfig) -> bool
fn eq(&self, other: &ShadowConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ShadowConfig
impl PartialOrd for ShadowConfig
impl StructuralPartialEq for ShadowConfig
Auto Trait Implementations§
impl Freeze for ShadowConfig
impl RefUnwindSafe for ShadowConfig
impl Send for ShadowConfig
impl Sync for ShadowConfig
impl Unpin for ShadowConfig
impl UnsafeUnpin for ShadowConfig
impl UnwindSafe for ShadowConfig
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