Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Stretch
✓ use stretch::Stretch;
Create a Flexbox layout and compute positions.
use stretch::Stretch;
use stretch::style::*;
fn main() {
let mut stretch = Stretch::new();
let child = stretch.new_node(Style::default(), vec![]).unwrap();
let parent = stretch.new_node(
Style { size: Size { width: Dimension::Points(100.0), height: Dimension::Points(100.0) }, ..Default::default() },
vec![child],
).unwrap();
stretch.compute_layout(parent, Size::undefined()).unwrap();
println!("{:?}", stretch.layout(child).unwrap().location);
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.