summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-12 06:45:40 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-12 06:45:40 +0100
commita5ae442819227b3cd55116028e6d6c96caa6fda9 (patch)
tree111e7b424a2c7044f8d98612015540282bf2ca8a /wgpu/src/layer.rs
parent89fc4f54bdbf62a29fcd06bc2e77926180143413 (diff)
parent603832e66c710ea39a95009ddc905de20c6856bd (diff)
downloadiced-a5ae442819227b3cd55116028e6d6c96caa6fda9.tar.gz
iced-a5ae442819227b3cd55116028e6d6c96caa6fda9.tar.bz2
iced-a5ae442819227b3cd55116028e6d6c96caa6fda9.zip
Merge pull request #2158 from iced-rs/feature/raw-text-primitive
Introduce `RawText` to `Primitive` in `iced_graphics`
Diffstat (limited to 'wgpu/src/layer.rs')
-rw-r--r--wgpu/src/layer.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/wgpu/src/layer.rs b/wgpu/src/layer.rs
index 557a7633..4ad12a88 100644
--- a/wgpu/src/layer.rs
+++ b/wgpu/src/layer.rs
@@ -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,