⎇ 272bca7d9b110816a1ac3ff828d441f4acb3449f
benches/generated/absolute_layout_within_border.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
Generate benchmarks for all test fixtures
1pub fn compute() -> stretch::layout::Node {
2 stretch::compute(
3 &stretch::style::Node {
4 size: stretch::geometry::Size {
5 width: stretch::style::Dimension::Points(100f32),
6 height: stretch::style::Dimension::Points(100f32),
7 ..Default::default()
8 },
9 children: vec![
10 stretch::style::Node {
11 position_type: stretch::style::PositionType::Absolute,
12 size: stretch::geometry::Size {
13 width: stretch::style::Dimension::Points(50f32),
14 height: stretch::style::Dimension::Points(50f32),
15 ..Default::default()
16 },
17 position: stretch::geometry::Rect {
18 start: stretch::style::Dimension::Points(0f32),
19 top: stretch::style::Dimension::Points(0f32),
20 ..Default::default()
21 },
22 ..Default::default()
23 },
24 stretch::style::Node {
25 position_type: stretch::style::PositionType::Absolute,
26 size: stretch::geometry::Size {
27 width: stretch::style::Dimension::Points(50f32),
28 height: stretch::style::Dimension::Points(50f32),
29 ..Default::default()
30 },
31 position: stretch::geometry::Rect {
32 end: stretch::style::Dimension::Points(0f32),
33 bottom: stretch::style::Dimension::Points(0f32),
34 ..Default::default()
35 },
36 ..Default::default()
37 },
38 stretch::style::Node {
39 position_type: stretch::style::PositionType::Absolute,
40 size: stretch::geometry::Size {
41 width: stretch::style::Dimension::Points(50f32),
42 height: stretch::style::Dimension::Points(50f32),
43 ..Default::default()
44 },
45 margin: stretch::geometry::Rect {
46 start: stretch::style::Dimension::Points(10f32),
47 end: stretch::style::Dimension::Points(10f32),
48 top: stretch::style::Dimension::Points(10f32),
49 bottom: stretch::style::Dimension::Points(10f32),
50 ..Default::default()
51 },
52 position: stretch::geometry::Rect {
53 start: stretch::style::Dimension::Points(0f32),
54 top: stretch::style::Dimension::Points(0f32),
55 ..Default::default()
56 },
57 ..Default::default()
58 },
59 stretch::style::Node {
60 position_type: stretch::style::PositionType::Absolute,
61 size: stretch::geometry::Size {
62 width: stretch::style::Dimension::Points(50f32),
63 height: stretch::style::Dimension::Points(50f32),
64 ..Default::default()
65 },
66 margin: stretch::geometry::Rect {
67 start: stretch::style::Dimension::Points(10f32),
68 end: stretch::style::Dimension::Points(10f32),
69 top: stretch::style::Dimension::Points(10f32),
70 bottom: stretch::style::Dimension::Points(10f32),
71 ..Default::default()
72 },
73 position: stretch::geometry::Rect {
74 end: stretch::style::Dimension::Points(0f32),
75 bottom: stretch::style::Dimension::Points(0f32),
76 ..Default::default()
77 },
78 ..Default::default()
79 },
80 ],
81 padding: stretch::geometry::Rect {
82 start: stretch::style::Dimension::Points(10f32),
83 end: stretch::style::Dimension::Points(10f32),
84 top: stretch::style::Dimension::Points(10f32),
85 bottom: stretch::style::Dimension::Points(10f32),
86 ..Default::default()
87 },
88 border: stretch::geometry::Rect {
89 start: stretch::style::Dimension::Points(10f32),
90 end: stretch::style::Dimension::Points(10f32),
91 top: stretch::style::Dimension::Points(10f32),
92 bottom: stretch::style::Dimension::Points(10f32),
93 ..Default::default()
94 },
95 ..Default::default()
96 },
97 stretch::geometry::Size::undefined(),
98 )
99 .unwrap()
100}