Replace Raw in core::text::Renderer with a new Renderer trait
This commit is contained in:
parent
4ea0db665f
commit
a0b409ed7e
6 changed files with 33 additions and 29 deletions
|
|
@ -352,3 +352,9 @@ pub fn to_color(color: Color) -> cosmic_text::Color {
|
|||
|
||||
cosmic_text::Color::rgba(r, g, b, a)
|
||||
}
|
||||
|
||||
/// A text renderer coupled to `iced_graphics`.
|
||||
pub trait Renderer {
|
||||
/// Draws the given [`Raw`] text.
|
||||
fn fill_raw(&mut self, raw: Raw);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue