#[repr(C)]pub struct Shadow {
pub order: DrawOrder,
pub blur_radius: ScaledPixels,
pub bounds: Bounds<ScaledPixels>,
pub shape_bounds: Bounds<ScaledPixels>,
pub corner_radii: Corners<ScaledPixels>,
pub content_mask: ContentMask<ScaledPixels>,
pub color: Hsla,
pub element_bounds: Bounds<ScaledPixels>,
pub element_corner_radii: Corners<ScaledPixels>,
pub inset: u32,
pub pad: u32,
}Expand description
重导出场景系统相关类型 阴影图元 — 支持外阴影和内阴影,可配置模糊半径和颜色。
Fields§
§order: DrawOrder绘制顺序。
blur_radius: ScaledPixels模糊半径。
bounds: Bounds<ScaledPixels>完整绘制边界;外阴影包含高斯扩散范围。
shape_bounds: Bounds<ScaledPixels>SDF 使用的阴影形状边界,不含高斯扩散范围。
corner_radii: Corners<ScaledPixels>圆角半径。
content_mask: ContentMask<ScaledPixels>内容裁剪蒙版。
color: Hsla颜色。
element_bounds: Bounds<ScaledPixels>元素边框盒;所有外阴影统一裁剪到此边界外侧(与 CSS box-shadow 一致)。
element_corner_radii: Corners<ScaledPixels>元素圆角半径。
inset: u320 = 外阴影(绘制在元素外部),1 = 内阴影(绘制在元素内部)。
pad: u328 字节对齐填充。
Trait Implementations§
Auto Trait Implementations§
impl Forget for Shadow
impl Freeze for Shadow
impl Move for Shadow
impl RefUnwindSafe for Shadow
impl Send for Shadow
impl Sync for Shadow
impl Unpin for Shadow
impl UnsafeUnpin for Shadow
impl UnwindSafe for Shadow
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more