From c7ee2b393a369325b3578557e045f2ff94ceab8f Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 22 Jun 2019 12:51:06 +0200 Subject: =?UTF-8?q?Fix=20top-left=20text=20alignment=20=F0=9F=93=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/doc.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/doc.rs') diff --git a/src/doc.rs b/src/doc.rs index f08332f6..0b4db73e 100644 --- a/src/doc.rs +++ b/src/doc.rs @@ -20,19 +20,17 @@ pub struct Page { pub width: Size, /// The height of the page. pub height: Size, - /// Text actions specifying how to draw text content on the page. - pub actions: Vec, + /// Layouting actions specifying how to draw content on the page. + pub actions: Vec, } -/// A text layouting action. +/// A layouting action. #[derive(Debug, Clone)] -pub enum TextAction { +pub enum LayoutAction { /// Move to an absolute position. MoveAbsolute(Size2D), - /// Move from the _start_ of the current line by an (x, y) offset. - MoveNewline(Size2D), - /// Write text starting at the current position. - WriteText(String), /// Set the font by index and font size. SetFont(usize, f32), + /// Write text starting at the current position. + WriteText(String), } -- cgit v1.2.3