⎇ c952015f074d09c3807572894ff7c2342307f89a
benches/generated/absolute_layout_width_height_start_top_end_bottom.rs
History
Who touched what
raw
update tests and benchmarks to use new api
1pub fn compute() -> stretch::result::Layout {
2 stretch::node::Node::new(
3 stretch::style::Style {
4 size: stretch::geometry::Size {
5 width: stretch::style::Dimension::Points(100f32),
6 height: stretch::style::Dimension::Points(100f32),
7 ..Default::default()
8 },
9 ..Default::default()
10 },
11 vec![&stretch::node::Node::new(
12 stretch::style::Style {
13 position_type: stretch::style::PositionType::Absolute,
14 size: stretch::geometry::Size {
15 width: stretch::style::Dimension::Points(10f32),
16 height: stretch::style::Dimension::Points(10f32),
17 ..Default::default()
18 },
19 position: stretch::geometry::Rect {
20 start: stretch::style::Dimension::Points(10f32),
21 end: stretch::style::Dimension::Points(10f32),
22 top: stretch::style::Dimension::Points(10f32),
23 bottom: stretch::style::Dimension::Points(10f32),
24 ..Default::default()
25 },
26 ..Default::default()
27 },
28 vec![],
29 )],
30 )
31 .compute_layout(stretch::geometry::Size::undefined())
32 .unwrap()
33}