⎇ bd6e1961c57e46cffc98b74abcc126b3264aa0dd
benches/generated/absolute_layout_start_top_end_bottom.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 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 position: stretch::geometry::Rect {
15 start: stretch::style::Dimension::Points(10f32),
16 end: stretch::style::Dimension::Points(10f32),
17 top: stretch::style::Dimension::Points(10f32),
18 bottom: stretch::style::Dimension::Points(10f32),
19 ..Default::default()
20 },
21 ..Default::default()
22 },
23 vec![],
24 )],
25 )
26 .compute_layout(stretch::geometry::Size::undefined())
27 .unwrap()
28}