diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-06-22 12:51:06 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-06-22 12:51:06 +0200 |
| commit | c7ee2b393a369325b3578557e045f2ff94ceab8f (patch) | |
| tree | 063e371b764b119e378644817cc556c397ebd9dd /src/doc.rs | |
| parent | f6fe3b5cdd2805f3975985752f9cb0e04e3daf49 (diff) | |
Fix top-left text alignment 📐
Diffstat (limited to 'src/doc.rs')
| -rw-r--r-- | src/doc.rs | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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<TextAction>, + /// Layouting actions specifying how to draw content on the page. + pub actions: Vec<LayoutAction>, } -/// 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), } |
