Introduce RawText to Primitive in iced_graphics
This should allow users to directly render a `cosmic_text::Buffer`.
This commit is contained in:
parent
fc285d3e46
commit
603832e66c
8 changed files with 131 additions and 4 deletions
|
|
@ -177,6 +177,21 @@ impl<'a> Layer<'a> {
|
|||
clip_bounds: *clip_bounds + translation,
|
||||
}));
|
||||
}
|
||||
graphics::Primitive::RawText(graphics::text::Raw {
|
||||
buffer,
|
||||
position,
|
||||
color,
|
||||
clip_bounds,
|
||||
}) => {
|
||||
let layer = &mut layers[current_layer];
|
||||
|
||||
layer.text.push(Text::Raw(graphics::text::Raw {
|
||||
buffer: buffer.clone(),
|
||||
position: *position + translation,
|
||||
color: *color,
|
||||
clip_bounds: *clip_bounds + translation,
|
||||
}));
|
||||
}
|
||||
Primitive::Quad {
|
||||
bounds,
|
||||
background,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue