text/
layout.rs

1use font::Font;
2
3use {Result, Text};
4
5/// A layout.
6pub struct Layout {
7    #[allow(dead_code)]
8    font: Font,
9}
10
11impl Layout {
12    /// Create a layout.
13    pub fn new(font: Font) -> Self {
14        Layout { font: font }
15    }
16
17    /// Compose a text.
18    pub fn draw<T: Into<String>>(&mut self, content: T) -> Result<Text> {
19        Ok(Text::new(content))
20    }
21}