pub struct MaterialShadow {
pub color: Color,
pub blur: f32,
pub offset: (f32, f32),
pub opacity: f32,
}Expand description
Shadow configuration for materials
Fields§
§color: ColorShadow color
blur: f32Blur radius
offset: (f32, f32)Offset (x, y)
opacity: f32Opacity
Implementations§
Source§impl MaterialShadow
impl MaterialShadow
Sourcepub fn new() -> MaterialShadow
pub fn new() -> MaterialShadow
Create a new shadow
Sourcepub fn color(self, color: Color) -> MaterialShadow
pub fn color(self, color: Color) -> MaterialShadow
Set shadow color
Sourcepub fn blur(self, blur: f32) -> MaterialShadow
pub fn blur(self, blur: f32) -> MaterialShadow
Set blur radius
Sourcepub fn offset(self, x: f32, y: f32) -> MaterialShadow
pub fn offset(self, x: f32, y: f32) -> MaterialShadow
Set offset
Sourcepub fn opacity(self, opacity: f32) -> MaterialShadow
pub fn opacity(self, opacity: f32) -> MaterialShadow
Set opacity
Sourcepub fn sm() -> MaterialShadow
pub fn sm() -> MaterialShadow
Small shadow
Sourcepub fn md() -> MaterialShadow
pub fn md() -> MaterialShadow
Medium shadow
Sourcepub fn lg() -> MaterialShadow
pub fn lg() -> MaterialShadow
Large shadow
Sourcepub fn xl() -> MaterialShadow
pub fn xl() -> MaterialShadow
Extra large shadow
Trait Implementations§
Source§impl Clone for MaterialShadow
impl Clone for MaterialShadow
Source§fn clone(&self) -> MaterialShadow
fn clone(&self) -> MaterialShadow
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 MaterialShadow
impl Debug for MaterialShadow
Source§impl Default for MaterialShadow
impl Default for MaterialShadow
Source§fn default() -> MaterialShadow
fn default() -> MaterialShadow
Returns the “default value” for a type. Read more
Source§impl From<&Shadow> for MaterialShadow
Convert from &Shadow to MaterialShadow
impl From<&Shadow> for MaterialShadow
Convert from &Shadow to MaterialShadow
Source§fn from(shadow: &Shadow) -> MaterialShadow
fn from(shadow: &Shadow) -> MaterialShadow
Converts to this type from the input type.
Source§impl From<Shadow> for MaterialShadow
Convert from blinc_core::Shadow to MaterialShadow
impl From<Shadow> for MaterialShadow
Convert from blinc_core::Shadow to MaterialShadow
Source§fn from(shadow: Shadow) -> MaterialShadow
fn from(shadow: Shadow) -> MaterialShadow
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MaterialShadow
impl RefUnwindSafe for MaterialShadow
impl Send for MaterialShadow
impl Sync for MaterialShadow
impl Unpin for MaterialShadow
impl UnsafeUnpin for MaterialShadow
impl UnwindSafe for MaterialShadow
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.