//! Simple test for transform rotation with shadow
use guido::prelude::*;
fn main() {
App::new().run(|app| {
app.add_surface(
SurfaceConfig::new()
.height(300)
.anchor(Anchor::TOP | Anchor::LEFT | Anchor::RIGHT)
.background_color(Color::rgb(0.1, 0.1, 0.15)),
|| {
container()
.layout(Flex::column().center())
.padding(16.0)
.child(
container()
.width(200.0)
.height(100.0)
.padding(10.0)
.background(Color::rgb(0.8, 0.3, 0.3))
.corners(8.0)
// A shadow, to test shadow rendering with rotation
.shadow(Shadow::new(
(0.0, 4.0),
8.0,
0.0,
Color::rgba(0.0, 0.0, 0.0, 0.2),
))
.rotate(45.0), // Should be clearly rotated
)
},
);
});
}