⎇ 3de41935b1054f945bfaeb40dfc213cd57366b9b
benches/generated/absolute_layout_child_order.rs
Historia
Quién tocó qué
crudo
update tests and benchmarks to use new api
1pub fn compute() -> stretch::result::Layout {
2 stretch::node::Node::new(
3 stretch::style::Style {
4 align_items: stretch::style::AlignItems::Center,
5 justify_content: stretch::style::JustifyContent::Center,
6 size: stretch::geometry::Size {
7 width: stretch::style::Dimension::Points(110f32),
8 height: stretch::style::Dimension::Points(100f32),
9 ..Default::default()
10 },
11 ..Default::default()
12 },
13 vec![
14 &stretch::node::Node::new(
15 stretch::style::Style {
16 size: stretch::geometry::Size {
17 width: stretch::style::Dimension::Points(60f32),
18 height: stretch::style::Dimension::Points(40f32),
19 ..Default::default()
20 },
21 ..Default::default()
22 },
23 vec![],
24 ),
25 &stretch::node::Node::new(
26 stretch::style::Style {
27 position_type: stretch::style::PositionType::Absolute,
28 size: stretch::geometry::Size {
29 width: stretch::style::Dimension::Points(60f32),
30 height: stretch::style::Dimension::Points(40f32),
31 ..Default::default()
32 },
33 ..Default::default()
34 },
35 vec![],
36 ),
37 &stretch::node::Node::new(
38 stretch::style::Style {
39 size: stretch::geometry::Size {
40 width: stretch::style::Dimension::Points(60f32),
41 height: stretch::style::Dimension::Points(40f32),
42 ..Default::default()
43 },
44 ..Default::default()
45 },
46 vec![],
47 ),
48 ],
49 )
50 .compute_layout(stretch::geometry::Size::undefined())
51 .unwrap()
52}