diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-12 23:33:26 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-12 23:33:26 +0100 |
| commit | f549914ff8d66e48e779d4d99898a224bd1ab701 (patch) | |
| tree | 12dddf9feb18a39bc05aa69fe8d9b5eac802dfaf /src/lib.rs | |
| parent | ff107cf3e75acf041f8b7631337d299cdeaa1685 (diff) | |
Refine and rename layouting types 🛀
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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, }, )?) |
