summaryrefslogtreecommitdiffstats
path: root/wgpu/src/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'wgpu/src/text.rs')
-rw-r--r--wgpu/src/text.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs
index 05db5f80..bf7eae18 100644
--- a/wgpu/src/text.rs
+++ b/wgpu/src/text.rs
@@ -585,7 +585,13 @@ fn prepare(
(
buffer.as_ref(),
- Rectangle::new(raw.position, Size::new(width, height)),
+ Rectangle::new(
+ raw.position,
+ Size::new(
+ width.unwrap_or(layer_bounds.width),
+ height.unwrap_or(layer_bounds.height),
+ ),
+ ),
alignment::Horizontal::Left,
alignment::Vertical::Top,
raw.color,