summaryrefslogtreecommitdiffstats
path: root/wgpu/src/widget/canvas/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-07 23:45:54 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-07 23:45:54 +0100
commitb74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68 (patch)
treed05e074ad1a57309ae1ed09f49fee1cbb78a6ea6 /wgpu/src/widget/canvas/text.rs
parent37f0d97159d81dbd4801e287a06f4e243e483269 (diff)
downloadiced-b74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68.tar.gz
iced-b74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68.tar.bz2
iced-b74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68.zip
Implement `Primitive::Cached`
Diffstat (limited to 'wgpu/src/widget/canvas/text.rs')
-rw-r--r--wgpu/src/widget/canvas/text.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/wgpu/src/widget/canvas/text.rs b/wgpu/src/widget/canvas/text.rs
index 241f8503..1f9bdc19 100644
--- a/wgpu/src/widget/canvas/text.rs
+++ b/wgpu/src/widget/canvas/text.rs
@@ -1,14 +1,12 @@
-use iced_native::{
- Color, Font, HorizontalAlignment, Rectangle, VerticalAlignment,
-};
+use iced_native::{Color, Font, HorizontalAlignment, Point, VerticalAlignment};
/// A bunch of text that can be drawn to a canvas
#[derive(Debug, Clone)]
pub struct Text {
/// The contents of the text
pub content: String,
- /// The bounds of the text
- pub bounds: Rectangle,
+ /// The position where to begin drawing the text (top-left corner coordinates)
+ pub position: Point,
/// The color of the text
pub color: Color,
/// The size of the text