feat: add fill_raw method and Raw associated type for text::Renderer
This commit is contained in:
parent
6bbe189809
commit
b26890f76e
7 changed files with 49 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ use crate::graphics;
|
|||
use crate::graphics::Mesh;
|
||||
use crate::graphics::color;
|
||||
use crate::graphics::layer;
|
||||
use crate::graphics::text::{Editor, Paragraph};
|
||||
use crate::graphics::text::{Editor, Paragraph, Raw};
|
||||
use crate::image::{self, Image};
|
||||
use crate::primitive::{self, Primitive};
|
||||
use crate::quad::{self, Quad};
|
||||
|
|
@ -101,6 +101,15 @@ impl Layer {
|
|||
self.pending_text.push(editor);
|
||||
}
|
||||
|
||||
pub fn draw_raw(&mut self, raw: Raw, transformation: Transformation) {
|
||||
let raw = Text::Raw {
|
||||
raw,
|
||||
transformation,
|
||||
};
|
||||
|
||||
self.pending_text.push(raw);
|
||||
}
|
||||
|
||||
pub fn draw_text(
|
||||
&mut self,
|
||||
text: crate::core::Text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue