use raui_app::app::declarative::DeclarativeApp;
use raui_core::{
make_widget,
widget::{
component::image_box::{ImageBoxProps, image_box},
unit::image::{ImageBoxAspectRatio, ImageBoxImage, ImageBoxMaterial},
},
};
fn main() {
let tree = make_widget!(image_box).with_props(ImageBoxProps {
material: ImageBoxMaterial::Image(ImageBoxImage {
id: "./demos/hello-world/resources/cats.jpg".to_owned(),
..Default::default()
}),
content_keep_aspect_ratio: Some(ImageBoxAspectRatio {
horizontal_alignment: 0.5,
vertical_alignment: 0.5,
outside: true,
}),
..Default::default()
});
DeclarativeApp::simple("Image Box - Image", tree);
}