tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Definiciones

⎇ 0.1.x benches/generated/absolute_layout_no_size.rs Rust · 23 líneas · 757 B Historia Quién tocó qué crudo

Rename sprawl to taffy (#134) 8936790d6 · Alice Cecile ·

1pub fn compute() {
2    let mut taffy = taffy::Taffy::new();
3    let node0 = taffy
4        .new_node(
5            taffy::style::Style { position_type: taffy::style::PositionType::Absolute, ..Default::default() },
6            &[],
7        )
8        .unwrap();
9    let node = taffy
10        .new_node(
11            taffy::style::Style {
12                size: taffy::geometry::Size {
13                    width: taffy::style::Dimension::Points(100f32),
14                    height: taffy::style::Dimension::Points(100f32),
15                    ..Default::default()
16                },
17                ..Default::default()
18            },
19            &[node0],
20        )
21        .unwrap();
22    taffy.compute_layout(node, taffy::geometry::Size::undefined()).unwrap();
23}