diff options
| author | 2020-03-07 23:45:54 +0100 | |
|---|---|---|
| committer | 2020-03-07 23:45:54 +0100 | |
| commit | b74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68 (patch) | |
| tree | d05e074ad1a57309ae1ed09f49fee1cbb78a6ea6 /wgpu/src/widget/canvas/text.rs | |
| parent | 37f0d97159d81dbd4801e287a06f4e243e483269 (diff) | |
| download | iced-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.rs | 8 |
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 |
