mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
wip: text drawing impls
This commit is contained in:
parent
29035d0b36
commit
9c5bfafb7a
2 changed files with 15 additions and 8 deletions
|
|
@ -12,11 +12,13 @@ pub(crate) use ::unicode_width::*;
|
|||
to.text(&self, x, y, w)
|
||||
}
|
||||
}
|
||||
|
||||
impl Draw<Tui> for String {
|
||||
fn draw (self, to: &mut Tui) -> Usually<XYWH<u16>> {
|
||||
self.as_str().draw(to)
|
||||
}
|
||||
}
|
||||
|
||||
impl Draw<Tui> for &std::sync::Arc<str> {
|
||||
fn draw (self, to: &mut Tui) -> Usually<XYWH<u16>> {
|
||||
self.as_ref().draw(to)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue