Closed JuanPotato closed 2 years ago
Thank you very much for your contribution.
Text takes up two "rows" of pixels in the hdcanvas. We could use this to add colored drawn text and treat the first row as the foreground and the second as the background.
That's clever, but I don't think we need to be worried about memory here. I'd rather change the representation of the characters to:
chars: Vec<Option<CharWithStyle>>,
where CharWithStyle
would be something like
struct CharWithStyle(char, Option<Style>);
Yeah, that definitely seems easier to use
Closing for now since this is rather old. We can always resurrect it later.
Text takes up two "rows" of pixels in the hdcanvas. We could use this to add colored drawn text and treat the first row as the foreground and the second as the background.
As an example usage (not added in this PR):![image](https://user-images.githubusercontent.com/9531780/67429209-afdaa500-f5ad-11e9-9d22-c7d952da3701.png)