Module freya_elements::elements::image  
source · Expand description
image element let’s you show an image.
For dynamic Images you may use dynamic_bytes.
§Example
ⓘ
static RUST_LOGO: &[u8] = include_bytes!("./rust_logo.png");
fn app() -> Element {
    let image_data = static_bytes(RUST_LOGO);
    rsx!(
        image {
            image_data: image_data,
            width: "100%", // You must specify size otherwhise it will default to 0
            height: "100%",
        }
    )
}Constants§
- Specify the width and height for the given element.
 - Specify the margin of an element. You can do so by four different ways, just like in CSS.
 - max_width & max_height
 - min_width & min_height
 - Specify the opacity of an element and all its descendants.
 - Specify how you want the element to be positioned inside it’s parent area.
 - The
rotateattribute let’s you rotate an element.