pub struct BoxShadowPatternData {
pub color: ColorF,
pub render_task: RenderTaskId,
pub shadow_rect_alloc_size: LayoutSize,
pub dest_rect_size: LayoutSize,
pub dest_rect_offset: LayoutVector2D,
pub clip_mode: BoxShadowClipMode,
pub element_offset_rel_prim: LayoutVector2D,
pub element_size: LayoutSize,
pub element_radius: BorderRadius,
}Fields§
§color: ColorF§render_task: RenderTaskId§shadow_rect_alloc_size: LayoutSizeFull blur alloc size in local pixels (= 2*blur_region + src_rect_size per axis). Used as the UV denominator so shadow_pos/alloc_size maps 1:1 to texture position.
dest_rect_size: LayoutSizeSize of dest_rect in local pixels. For outset this equals shadow_rect_alloc_size (prim_rect == dest_rect). For inset the prim is the element rect while dest_rect is smaller (the shadow area), so these differ.
dest_rect_offset: LayoutVector2DOffset of dest_rect.p0 relative to prim_rect.p0 in local pixels. Zero for outset. For inset: dest_rect.min - element_rect.min.
clip_mode: BoxShadowClipMode§element_offset_rel_prim: LayoutVector2DOffset of the element rect’s min corner relative to prim_rect.p0. Zero for inset (prim_rect IS the element rect). For outset: element_rect.min - dest_rect.min.
element_size: LayoutSize§element_radius: BorderRadiusTrait Implementations§
Source§impl PatternBuilder for BoxShadowPatternData
impl PatternBuilder for BoxShadowPatternData
fn build( &self, _sub_rect: Option<DeviceRect>, _offset: LayoutVector2D, _ctx: &PatternBuilderContext<'_>, state: &mut PatternBuilderState<'_>, ) -> Pattern
Auto Trait Implementations§
impl Freeze for BoxShadowPatternData
impl RefUnwindSafe for BoxShadowPatternData
impl Send for BoxShadowPatternData
impl Sync for BoxShadowPatternData
impl Unpin for BoxShadowPatternData
impl UnsafeUnpin for BoxShadowPatternData
impl UnwindSafe for BoxShadowPatternData
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> 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