From 6f22e4f13c42f06b686a01fbdd28a0163e88ae77 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 11 Oct 2019 20:28:22 +0200 Subject: =?UTF-8?q?Render=20debug=20boxes=20=F0=9F=A7=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/export/pdf.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/export') diff --git a/src/export/pdf.rs b/src/export/pdf.rs index d601f6b3..3a3f2a9c 100644 --- a/src/export/pdf.rs +++ b/src/export/pdf.rs @@ -14,7 +14,8 @@ use toddle::font::OwnedFont; use toddle::query::SharedFontLoader; use toddle::Error as FontError; -use crate::doc::{Document, Page as DocPage, LayoutAction}; +use crate::layout::LayoutAction; +use crate::doc::{Document, Page as DocPage}; use crate::size::{Size, Size2D}; @@ -192,16 +193,16 @@ impl<'d, W: Write> PdfEngine<'d, W> { } // Flush the position. - if let Some(pos) = next_pos { + if let Some(pos) = next_pos.take() { let x = pos.x.to_pt(); let y = (page.height - pos.y - Size::pt(active_font.1)).to_pt(); text.tm(1.0, 0.0, 0.0, 1.0, x, y); - next_pos = None; } // Write the text. text.tj(self.fonts[active_font.0].encode_text(&string)?); }, + LayoutAction::DebugBox(_, _) => {}, } } -- cgit v1.2.3