From d689d706eaf3079877406e71b0d642623c9eb230 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 12 Feb 2023 21:14:12 +0100 Subject: Vertically center non-math content in math by default --- src/doc.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/doc.rs b/src/doc.rs index 47bdb23d..9fbd9436 100644 --- a/src/doc.rs +++ b/src/doc.rs @@ -85,6 +85,11 @@ impl Frame { self.baseline.unwrap_or(self.size.y) } + /// Whether the frame has a non-default baseline. + pub fn has_baseline(&mut self) -> bool { + self.baseline.is_some() + } + /// Set the frame's baseline from the top. pub fn set_baseline(&mut self, baseline: Abs) { self.baseline = Some(baseline); -- cgit v1.2.3