⎇ 9f42ca4a0d99e501f16c3148bd1caf12b37b2ac5
benches/generated/absolute_layout_width_height_start_top_end_bottom.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
1pub fn compute() {
2 let mut stretch = stretch::Stretch::new();
3 let node0 = stretch
4 .new_node(
5 stretch::style::Style {
6 position_type: stretch::style::PositionType::Absolute,
7 size: stretch::geometry::Size {
8 width: stretch::style::Dimension::Points(10f32),
9 height: stretch::style::Dimension::Points(10f32),
10 ..Default::default()
11 },
12 position: stretch::geometry::Rect {
13 start: stretch::style::Dimension::Points(10f32),
14 end: stretch::style::Dimension::Points(10f32),
15 top: stretch::style::Dimension::Points(10f32),
16 bottom: stretch::style::Dimension::Points(10f32),
17 ..Default::default()
18 },
19 ..Default::default()
20 },
21 vec![],
22 )
23 .unwrap();
24 let node = stretch
25 .new_node(
26 stretch::style::Style {
27 size: stretch::geometry::Size {
28 width: stretch::style::Dimension::Points(100f32),
29 height: stretch::style::Dimension::Points(100f32),
30 ..Default::default()
31 },
32 ..Default::default()
33 },
34 vec![node0],
35 )
36 .unwrap();
37 stretch.compute_layout(node, stretch::geometry::Size::undefined()).unwrap();
38}