gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 1076HTML 1008Markdown 12TOML 83208 Definiciones

⎇ bd6e1961c57e46cffc98b74abcc126b3264aa0dd benches/generated/absolute_layout_in_wrap_reverse_column_container.rs Rust · 28 líneas · 1.0 KB Historia Quién tocó qué crudo

update tests and benchmarks to use new api 1f8c44154 · Emil Sjölander ·

1pub fn compute() -> stretch::result::Layout {
2    stretch::node::Node::new(
3        stretch::style::Style {
4            flex_direction: stretch::style::FlexDirection::Column,
5            flex_wrap: stretch::style::FlexWrap::WrapReverse,
6            size: stretch::geometry::Size {
7                width: stretch::style::Dimension::Points(100f32),
8                height: stretch::style::Dimension::Points(100f32),
9                ..Default::default()
10            },
11            ..Default::default()
12        },
13        vec![&stretch::node::Node::new(
14            stretch::style::Style {
15                position_type: stretch::style::PositionType::Absolute,
16                size: stretch::geometry::Size {
17                    width: stretch::style::Dimension::Points(20f32),
18                    height: stretch::style::Dimension::Points(20f32),
19                    ..Default::default()
20                },
21                ..Default::default()
22            },
23            vec![],
24        )],
25    )
26    .compute_layout(stretch::geometry::Size::undefined())
27    .unwrap()
28}