summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-12-12 23:33:26 +0100
committerLaurenz <laurmaedje@gmail.com>2019-12-12 23:33:26 +0100
commitf549914ff8d66e48e779d4d99898a224bd1ab701 (patch)
tree12dddf9feb18a39bc05aa69fe8d9b5eac802dfaf /src/lib.rs
parentff107cf3e75acf041f8b7631337d299cdeaa1685 (diff)
Refine and rename layouting types 🛀
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8e5d1441..922ff76e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -91,6 +91,7 @@ impl<'p> Typesetter<'p> {
/// Layout a syntax tree and return the produced layout.
pub fn layout(&self, tree: &SyntaxTree) -> LayoutResult<MultiLayout> {
+ use crate::layout::prelude::*;
Ok(layout_tree(
&tree,
LayoutContext {
@@ -98,12 +99,13 @@ impl<'p> Typesetter<'p> {
style: &self.style,
spaces: smallvec![LayoutSpace {
dimensions: self.style.page.dimensions,
- expand: LayoutExpansion::new(true, true),
padding: self.style.page.margins,
+ expansion: LayoutExpansion::new(true, true),
}],
- axes: LayoutAxes::default(),
- alignment: LayoutAlignment::default(),
- top_level: true,
+ repeat: true,
+ axes: LayoutAxes::new(LeftToRight, TopToBottom),
+ alignment: LayoutAlignment::new(Origin, Origin),
+ nested: false,
debug: false,
},
)?)