Constant freya::elements::rect::scale

pub const scale: (&'static str, Option<&'static str>, bool);
Expand description

Specify the scale for this element.

Accepted syntax:

  • <f32>: Same value for both scale x and y.
  • <f32>, <f32>: Specify the scale x and y separately.

Note: Scaling doesn’t affect neither layout or mouse events, it is only a rendering effect.

§Example

fn app() -> Element {
    rsx!(
        rect {
            background: "red",
            scale: "0.7",
            label {
                "Freya!"
            }
        }
    )
}