Components / Marquee
Marquee
Marching ants around a rectangle, a path or loose segments.
Example
The component itself, running in WebAssembly, beside its code in a playground. Try it.
Code
use ravenrs::prelude::*;
fn marquee() -> impl View {
let lasso =
[Point::new(20.0, 30.0), Point::new(120.0, 40.0), Point::new(100.0, 120.0), Point::new(30.0, 110.0)];
HStack::new((
Marquee::rect(Rect::new(20.0, 20.0, 110.0, 100.0)).size(150.0, 140.0),
Marquee::path(lasso).size(150.0, 140.0),
))
.spacing(12.0)
}