pub struct LayerStyle {
pub bounds: Rect,
pub opacity: f32,
pub blend_mode: BlendMode,
pub filters: Vec<Filter>,
pub backdrop_filters: Vec<Filter>,
pub shadows: Vec<Shadow>,
pub mask: LayerMask,
pub profile: Option<RenderObjectId>,
}Fields§
§bounds: Rect§opacity: f32§blend_mode: BlendMode§filters: Vec<Filter>§backdrop_filters: Vec<Filter>§shadows: Vec<Shadow>§mask: LayerMask§profile: Option<RenderObjectId>Implementations§
Source§impl LayerStyle
impl LayerStyle
pub const fn new(bounds: Rect) -> Self
pub fn filter(self, filter: Filter) -> Self
pub fn backdrop(self, filter: Filter) -> Self
pub fn shadow(self, shadow: Shadow) -> Self
pub const fn opacity(self, opacity: f32) -> Self
pub const fn blend(self, blend_mode: BlendMode) -> Self
pub const fn mask(self, mask: LayerMask) -> Self
pub const fn profile(self, profile: RenderObjectId) -> Self
pub fn requires_offscreen(&self) -> bool
pub fn expanded_bounds(&self) -> Rect
pub fn foreground_expansion(&self) -> f32
pub fn foreground_bounds(&self) -> Rect
pub fn scaled(&self, factor: f32) -> Self
Trait Implementations§
Source§impl Clone for LayerStyle
impl Clone for LayerStyle
Source§fn clone(&self) -> LayerStyle
fn clone(&self) -> LayerStyle
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 LayerStyle
impl Debug for LayerStyle
Source§impl PartialEq for LayerStyle
impl PartialEq for LayerStyle
impl StructuralPartialEq for LayerStyle
Auto Trait Implementations§
impl Freeze for LayerStyle
impl RefUnwindSafe for LayerStyle
impl Send for LayerStyle
impl Sync for LayerStyle
impl Unpin for LayerStyle
impl UnsafeUnpin for LayerStyle
impl UnwindSafe for LayerStyle
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