summaryrefslogtreecommitdiffstats
path: root/wgpu/src/layer/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2024-05-23 13:29:45 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2024-05-23 13:29:45 +0200
commitd8ba6b0673a33724a177f3a1ba59705527280142 (patch)
tree89482c8d1e3a03e00b3a8151abbb81e30ae5898c /wgpu/src/layer/text.rs
parent72ed8bcc8def9956e25f3720a3095fc96bb2eef0 (diff)
parent468794d918eb06c1dbebb33c32b10017ad335f05 (diff)
downloadiced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.gz
iced-d8ba6b0673a33724a177f3a1ba59705527280142.tar.bz2
iced-d8ba6b0673a33724a177f3a1ba59705527280142.zip
Merge branch 'master' into feat/text-macro
Diffstat (limited to 'wgpu/src/layer/text.rs')
-rw-r--r--wgpu/src/layer/text.rs70
1 files changed, 0 insertions, 70 deletions
diff --git a/wgpu/src/layer/text.rs b/wgpu/src/layer/text.rs
deleted file mode 100644
index b3a00130..00000000
--- a/wgpu/src/layer/text.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use crate::core::alignment;
-use crate::core::text;
-use crate::core::{Color, Font, Pixels, Point, Rectangle, Transformation};
-use crate::graphics;
-use crate::graphics::text::editor;
-use crate::graphics::text::paragraph;
-
-/// A text primitive.
-#[derive(Debug, Clone)]
-pub enum Text<'a> {
- /// A paragraph.
- #[allow(missing_docs)]
- Paragraph {
- paragraph: paragraph::Weak,
- position: Point,
- color: Color,
- clip_bounds: Rectangle,
- transformation: Transformation,
- },
- /// An editor.
- #[allow(missing_docs)]
- Editor {
- editor: editor::Weak,
- position: Point,
- color: Color,
- clip_bounds: Rectangle,
- transformation: Transformation,
- },
- /// Some cached text.
- Cached(Cached<'a>),
- /// Some raw text.
- #[allow(missing_docs)]
- Raw {
- raw: graphics::text::Raw,
- transformation: Transformation,
- },
-}
-
-#[derive(Debug, Clone)]
-pub struct Cached<'a> {
- /// The content of the [`Text`].
- pub content: &'a str,
-
- /// The layout bounds of the [`Text`].
- pub bounds: Rectangle,
-
- /// The color of the [`Text`], in __linear RGB_.
- pub color: Color,
-
- /// The size of the [`Text`] in logical pixels.
- pub size: Pixels,
-
- /// The line height of the [`Text`].
- pub line_height: text::LineHeight,
-
- /// The font of the [`Text`].
- pub font: Font,
-
- /// The horizontal alignment of the [`Text`].
- pub horizontal_alignment: alignment::Horizontal,
-
- /// The vertical alignment of the [`Text`].
- pub vertical_alignment: alignment::Vertical,
-
- /// The shaping strategy of the text.
- pub shaping: text::Shaping,
-
- /// The clip bounds of the text.
- pub clip_bounds: Rectangle,
-}