pub struct ShadowRRect {
pub bounds: Rect,
pub radii: [f32; 4],
pub umbra_inset: f32,
pub distance_correction: f32,
pub hole: Option<ShadowHole>,
}Expand description
One pass of a shadow as Skia’s ShadowCircularRRectOp draws it: a round
rect whose penumbra rises from its outer edge, bounds, toward the umbra
umbra_inset in. Corners are fans of triangles whose offsets the GPU
interpolates, so a corner is a quarter circle where the umbra meets its
radius and a skewed one where the blur is wider. Every length is in the
space the shadow is collected in.
Fields§
§bounds: RectThe penumbra’s outer edge.
radii: [f32; 4]The outer corner radii: top-left, top-right, bottom-right, bottom-left.
umbra_inset: f32How far in from bounds the ramp runs, at most half the smaller side.
distance_correction: f32The ramp’s coordinate at the umbra: the umbra inset over the blur.
hole: Option<ShadowHole>The part an opaque caster covers, which the shadow leaves undrawn.
Implementations§
Source§impl ShadowRRect
impl ShadowRRect
Trait Implementations§
Source§impl Clone for ShadowRRect
impl Clone for ShadowRRect
impl Copy for ShadowRRect
Source§impl Debug for ShadowRRect
impl Debug for ShadowRRect
Source§impl PartialEq for ShadowRRect
impl PartialEq for ShadowRRect
impl StructuralPartialEq for ShadowRRect
Auto Trait Implementations§
impl Freeze for ShadowRRect
impl RefUnwindSafe for ShadowRRect
impl Send for ShadowRRect
impl Sync for ShadowRRect
impl Unpin for ShadowRRect
impl UnsafeUnpin for ShadowRRect
impl UnwindSafe for ShadowRRect
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