pub struct Shadow {
pub color: Ink,
pub blur: f64,
pub dx: f64,
pub dy: f64,
}Expand description
A drop shadow: the silhouette of what is drawn, blurred, tinted color and moved by
(dx, dy) points (docs/canvas.md “Shadows”, docs/surfaces.md).
blur is the CSS box-shadow blur radius: the width of the soft edge, twice the standard
deviation of the Gaussian that makes it. 0 is a hard-edged copy. The offset and the blur
are in points and are not scaled or rotated by a canvas’s current transform, the rule Core
Graphics and the HTML canvas share.
On a canvas (DrawOp::Shadow) every fill, stroke, text and image drawn while it is set
casts its own. On a surface (props::ContainerProps::shadow) it is the shadow of the
surface’s rounded rectangle, drawn outside its frame without taking any room in layout.
Fields§
§color: Ink§blur: f64§dx: f64§dy: f64Implementations§
Trait Implementations§
impl Copy for Shadow
impl StructuralPartialEq for Shadow
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