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

@ -41,7 +41,6 @@ impl text::Renderer for () {
type Font = Font;
type Paragraph = ();
type Editor = ();
type Raw = ();
const ICON_FONT: Font = Font::DEFAULT;
const CHECKMARK_ICON: char = '0';
@ -74,8 +73,6 @@ impl text::Renderer for () {
) {
}
fn fill_raw(&mut self, _raw: Self::Raw) {}
fn fill_text(
&mut self,
_paragraph: Text,

View file

@ -299,9 +299,6 @@ pub trait Renderer: crate::Renderer {
/// The [`Editor`] of this [`Renderer`].
type Editor: Editor<Font = Self::Font> + 'static;
/// The `Raw` text of this [`Renderer`].
type Raw: 'static;
/// The icon font of the backend.
const ICON_FONT: Self::Font;
@ -346,9 +343,6 @@ pub trait Renderer: crate::Renderer {
clip_bounds: Rectangle,
);
/// Draws the given `Raw` text.
fn fill_raw(&mut self, raw: Self::Raw);
/// Draws the given [`Text`] at the given position and with the given
/// [`Color`].
fn fill_text(