pub fn shadow(
view: &ViewHandle,
c: Color,
radius: f64,
dx: f64,
dy: f64,
) -> ViewHandleExpand description
Apply .shadow(color:radius:x:y:).
Examples found in repository?
examples/ios_app.rs (lines 281-287)
276fn effects() -> views::ViewHandle {
277 let tile = |c: Color| views::frame(&views::color(c.r, c.g, c.b, c.a), 48.0, 40.0);
278 views::hstack_spacing(
279 &[
280 views::blur(&tile(Color::new(0.95, 0.4, 0.3, 1.0)), 4.0),
281 views::shadow(
282 &tile(Color::new(0.3, 0.7, 1.0, 1.0)),
283 Color::new(0.0, 0.0, 0.0, 0.8),
284 8.0,
285 0.0,
286 4.0,
287 ),
288 views::opacity(&tile(Color::new(0.5, 0.9, 0.5, 1.0)), 0.35),
289 views::corner_radius(&tile(Color::new(0.9, 0.7, 0.2, 1.0)), 12.0),
290 views::border(&tile(Color::new(0.0, 0.0, 0.0, 0.0)), 1.0, 1.0, 1.0, 2.0),
291 ],
292 10.0,
293 )
294}