Replace Raw in core::text::Renderer with a new Renderer trait

This commit is contained in:
Héctor Ramón Jiménez 2025-11-26 00:41:05 +01:00
parent 4ea0db665f
commit a0b409ed7e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
6 changed files with 33 additions and 29 deletions

View file

@ -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);
}