pub struct DropShadowV1 {
pub offset_px: Point,
pub blur_radius_px: Px,
pub downsample: u32,
pub color: Color,
}Expand description
Bounded drop shadow parameters (v1).
This is a mechanism-level, blur-based shadow surface intended for general UI content (cards, popovers, overlays). It is explicitly bounded and deterministic so it remains viable on wasm/WebGPU and mobile GPUs.
Fields§
§offset_px: PointShadow offset in logical pixels (pre-scale-factor).
blur_radius_px: PxBlur radius in logical pixels (pre-scale-factor).
downsample: u32Downsample hint (1–4). Renderers may degrade deterministically under budgets.
color: ColorSolid shadow color (unpremultiplied RGBA in [0, 1]).
Implementations§
Source§impl DropShadowV1
impl DropShadowV1
pub const MAX_BLUR_RADIUS_PX: Px
pub fn sanitize(self) -> Self
Trait Implementations§
Source§impl Clone for DropShadowV1
impl Clone for DropShadowV1
Source§fn clone(&self) -> DropShadowV1
fn clone(&self) -> DropShadowV1
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 DropShadowV1
impl Debug for DropShadowV1
Source§impl PartialEq for DropShadowV1
impl PartialEq for DropShadowV1
impl Copy for DropShadowV1
impl StructuralPartialEq for DropShadowV1
Auto Trait Implementations§
impl Freeze for DropShadowV1
impl RefUnwindSafe for DropShadowV1
impl Send for DropShadowV1
impl Sync for DropShadowV1
impl Unpin for DropShadowV1
impl UnsafeUnpin for DropShadowV1
impl UnwindSafe for DropShadowV1
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