tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 231Rust 9TOML 3CSS 1345 Definiciones

⎇ edd994fd39750e366114cf4d5a66f7092a97edfa benches/generated/padding_no_child.rs Rust · 19 líneas · 712 B Historia Quién tocó qué crudo

Update benches to API changes edd994fd3 · msiglreith ·

1pub fn compute() {
2    let mut stretch = stretch::Stretch::new();
3    let node = stretch
4        .new_node(
5            stretch::style::Style {
6                padding: stretch::geometry::Rect {
7                    start: stretch::style::Dimension::Points(10f32),
8                    end: stretch::style::Dimension::Points(10f32),
9                    top: stretch::style::Dimension::Points(10f32),
10                    bottom: stretch::style::Dimension::Points(10f32),
11                    ..Default::default()
12                },
13                ..Default::default()
14            },
15            vec![],
16        )
17        .unwrap();
18    stretch.compute_layout(node, stretch::geometry::Size::undefined()).unwrap();
19}