drawme 0.0.0

Static 2d rendering engine skia alternative
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::prelude::*;
use std::borrow::Cow;

#[derive(Default)]
pub struct TextBuilder<'a> {
    inner: Cow<'a, str>,
}

impl<'a> TextBuilder<'a> {
    pub fn with_str(mut self, text: impl Into<Cow<'a, str>>) -> Self {
        self.inner = text.into();
        self
    }

    pub fn build(self) -> Text<'a> {
        Text { inner: self.inner }
    }
}