A vbox/hbox layout library implemented in Rust.
rust
[dependencies]
shoji = "0.0"
```rust use shoji::*;
fn main() -> Result<(), stretch::Error> { let mut shoji = Node::new();
let child = shoji.new_node(
Style { ..Default::default() },
vec![],
)?;
let node = shoji.new_node(
Style {
justify_content: JustifyContent::Center,
..Default::default()
},
vec![child],
)?;
shoji.compute_layout(node, Size::undefined())?;
dbg!(shoji.layout(node)?);
} ```
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in shoji
by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.