From 665b4d2aca81af48b8e0eaca4e709ef2e7825844 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 13 Dec 2019 23:59:01 +0100 Subject: =?UTF-8?q?More=20consistent=20library=20code=20and=20functions=20?= =?UTF-8?q?=F0=9F=8E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 922ff76e..c4e8fbe1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,8 +27,7 @@ use toddle::query::{FontLoader, FontProvider, SharedFontLoader}; use toddle::Error as FontError; use crate::func::Scope; -use crate::layout::{layout_tree, MultiLayout, LayoutContext, LayoutResult}; -use crate::layout::{LayoutSpace, LayoutExpansion, LayoutAxes, LayoutAlignment}; +use crate::layout::{MultiLayout, LayoutResult}; use crate::syntax::{parse, SyntaxTree, ParseContext, Span, ParseResult}; use crate::style::{LayoutStyle, PageStyle, TextStyle}; @@ -92,11 +91,12 @@ impl<'p> Typesetter<'p> { /// Layout a syntax tree and return the produced layout. pub fn layout(&self, tree: &SyntaxTree) -> LayoutResult { use crate::layout::prelude::*; - Ok(layout_tree( + Ok(layout( &tree, LayoutContext { loader: &self.loader, style: &self.style, + base: self.style.page.dimensions.unpadded(self.style.page.margins), spaces: smallvec![LayoutSpace { dimensions: self.style.page.dimensions, padding: self.style.page.margins, -- cgit v1.2.3