1#![feature(type_alias_impl_trait, impl_trait_in_assoc_type)]
2
3use nuit::{Bind, Capsule, Circle, Color, Ellipse, Rectangle, RoundedRectangle, ShapeExt, VStack, View, ViewExt};
4
5#[derive(Bind)]
6struct ShapesView;
7
8impl View for ShapesView {
9 type Body = impl View;
10
11 fn body(&self) -> Self::Body {
12 VStack::new(
13 (
14 Capsule::new(),
15 Circle::new(),
16 Ellipse::new(),
17 Rectangle::new(),
18 RoundedRectangle::with_corner_radius(15.0)
19 .fill(Color::RED),
20 )
21 .frame((100, 50))
22 )
23 }
24}
25
26fn main() {
27 nuit::run_app(ShapesView);
28}