summaryrefslogtreecommitdiff
path: root/src/eval/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/state.rs')
-rw-r--r--src/eval/state.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eval/state.rs b/src/eval/state.rs
index 2a8ee2f0..ce6bd009 100644
--- a/src/eval/state.rs
+++ b/src/eval/state.rs
@@ -4,8 +4,9 @@ use fontdock::{fallback, FallbackTree, FontStretch, FontStyle, FontVariant, Font
use super::Scope;
use crate::geom::{
- Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size,
+ Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size, Spec,
};
+use crate::layout::Expansion;
use crate::paper::{Paper, PaperClass, PAPER_A4};
/// The evaluation state.
@@ -45,6 +46,8 @@ pub struct StatePage {
pub class: PaperClass,
/// The width and height of the page.
pub size: Size,
+ /// Whether the expand the pages to the `size` or to fit the content.
+ pub expand: Spec<Expansion>,
/// The amount of white space in the order [left, top, right, bottom]. If a
/// side is set to `None`, the default for the paper class is used.
pub margins: Sides<Option<Linear>>,
@@ -56,6 +59,7 @@ impl StatePage {
Self {
class: paper.class,
size: paper.size(),
+ expand: Spec::uniform(Expansion::Fill),
margins: Sides::uniform(None),
}
}