⎇ 72a1d81325e63c351a9bcbf07427e676cbe938c4
benches/generated/margin_bottom.rs
Historia
Quién tocó qué
crudo
1pub fn compute() {
2 let mut stretch = stretch2::Stretch::new();
3 let node0 = stretch
4 .new_node(
5 stretch2::style::Style {
6 size: stretch2::geometry::Size {
7 height: stretch2::style::Dimension::Points(10f32),
8 ..Default::default()
9 },
10 margin: stretch2::geometry::Rect {
11 bottom: stretch2::style::Dimension::Points(10f32),
12 ..Default::default()
13 },
14 ..Default::default()
15 },
16 &[],
17 )
18 .unwrap();
19 let node = stretch
20 .new_node(
21 stretch2::style::Style {
22 flex_direction: stretch2::style::FlexDirection::Column,
23 justify_content: stretch2::style::JustifyContent::FlexEnd,
24 size: stretch2::geometry::Size {
25 width: stretch2::style::Dimension::Points(100f32),
26 height: stretch2::style::Dimension::Points(100f32),
27 ..Default::default()
28 },
29 ..Default::default()
30 },
31 &[node0],
32 )
33 .unwrap();
34 stretch.compute_layout(node, stretch2::geometry::Size::undefined()).unwrap();
35}