summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-12-05 02:19:17 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-12-05 02:19:17 +0100
commit603832e66c710ea39a95009ddc905de20c6856bd (patch)
tree9682de5108d8102b25c109c0388556c7c49794ec /wgpu/src/layer/text.rs
parentfc285d3e461626408c56bbc1605fcf0c974b2f69 (diff)
downloadiced-603832e66c710ea39a95009ddc905de20c6856bd.tar.gz
iced-603832e66c710ea39a95009ddc905de20c6856bd.tar.bz2
iced-603832e66c710ea39a95009ddc905de20c6856bd.zip
Introduce `RawText` to `Primitive` in `iced_graphics`
This should allow users to directly render a `cosmic_text::Buffer`.
Diffstat (limited to 'wgpu/src/layer/text.rs')
-rw-r--r--wgpu/src/layer/text.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/wgpu/src/layer/text.rs b/wgpu/src/layer/text.rs
index df2f2875..37ee5247 100644
--- a/wgpu/src/layer/text.rs
+++ b/wgpu/src/layer/text.rs
@@ -1,6 +1,7 @@
use crate::core::alignment;
use crate::core::text;
use crate::core::{Color, Font, Pixels, Point, Rectangle};
+use crate::graphics;
use crate::graphics::text::editor;
use crate::graphics::text::paragraph;
@@ -23,8 +24,10 @@ pub enum Text<'a> {
color: Color,
clip_bounds: Rectangle,
},
- /// A cached text.
+ /// Some cached text.
Cached(Cached<'a>),
+ /// Some raw text.
+ Raw(graphics::text::Raw),
}
#[derive(Debug, Clone)]