pub struct ShadowSpec {
pub offset_x: f32,
pub offset_y: f32,
pub blur: f32,
pub spread: f32,
pub color: Color,
pub inner: bool,
}Expand description
Shadow record stored on Visuals::shadows.
offset_x/offset_ymove the shadow origin in logical pixels.bluris the Gaussian std-dev (0= sharp offset clone).inner = truerenders an inset shadow clipped to the rect with the blurred draw at the negated offset.
Fields§
§offset_x: f32Horizontal offset in logical pixels (positive = right).
offset_y: f32Vertical offset in logical pixels (positive = down).
blur: f32Gaussian blur radius (std-dev). 0 = sharp offset.
spread: f32CSS spread radius - inflates (positive) / deflates (negative)
the shadow rect before blurring. Enables the hard double-ring
idiom box-shadow: 0 0 0 2 <color>.
color: ColorShadow color; alpha controls softness.
inner: booltrue renders as inset shadow; false (default) renders as drop shadow.
Trait Implementations§
Source§impl Clone for ShadowSpec
impl Clone for ShadowSpec
Source§fn clone(&self) -> ShadowSpec
fn clone(&self) -> ShadowSpec
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 ShadowSpec
impl Debug for ShadowSpec
Source§impl Default for ShadowSpec
impl Default for ShadowSpec
Source§fn default() -> ShadowSpec
fn default() -> ShadowSpec
Returns the “default value” for a type. Read more
Source§impl PartialEq for ShadowSpec
impl PartialEq for ShadowSpec
Source§fn eq(&self, other: &ShadowSpec) -> bool
fn eq(&self, other: &ShadowSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ShadowSpec
impl StructuralPartialEq for ShadowSpec
Auto Trait Implementations§
impl Freeze for ShadowSpec
impl RefUnwindSafe for ShadowSpec
impl Send for ShadowSpec
impl Sync for ShadowSpec
impl Unpin for ShadowSpec
impl UnsafeUnpin for ShadowSpec
impl UnwindSafe for ShadowSpec
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,
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a Template::Output.§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.