summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/widget/canvas/frame.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/wgpu/src/widget/canvas/frame.rs b/wgpu/src/widget/canvas/frame.rs
index f22d7887..de4717f1 100644
--- a/wgpu/src/widget/canvas/frame.rs
+++ b/wgpu/src/widget/canvas/frame.rs
@@ -175,9 +175,11 @@ impl Frame {
/// [`Text`]: struct.Text.html
/// [`Frame`]: struct.Frame.html
/// [`Canvas`]: struct.Canvas.html
- pub fn fill_text(&mut self, text: Text) {
+ pub fn fill_text(&mut self, text: impl Into<Text>) {
use std::f32;
+ let text = text.into();
+
let position = if self.transforms.current.is_identity {
text.position
} else {