tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 231Rust 9TOML 3CSS 1345 Definitions

⎇ 272bca7d9b110816a1ac3ff828d441f4acb3449f benches/generated/margin_with_sibling_column.rs Rust · 26 lines · 961 B History Who touched what raw

Generate benchmarks for all test fixtures 272bca7d9 · Emil Sjölander ·

1pub fn compute() -> stretch::layout::Node {
2    stretch::compute(
3        &stretch::style::Node {
4            flex_direction: stretch::style::FlexDirection::Column,
5            size: stretch::geometry::Size {
6                width: stretch::style::Dimension::Points(100f32),
7                height: stretch::style::Dimension::Points(100f32),
8                ..Default::default()
9            },
10            children: vec![
11                stretch::style::Node {
12                    flex_grow: 1f32,
13                    margin: stretch::geometry::Rect {
14                        bottom: stretch::style::Dimension::Points(10f32),
15                        ..Default::default()
16                    },
17                    ..Default::default()
18                },
19                stretch::style::Node { flex_grow: 1f32, ..Default::default() },
20            ],
21            ..Default::default()
22        },
23        stretch::geometry::Size::undefined(),
24    )
25    .unwrap()
26}