summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src/engine.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tiny_skia/src/engine.rs')
-rw-r--r--tiny_skia/src/engine.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/tiny_skia/src/engine.rs b/tiny_skia/src/engine.rs
index 028b304f..898657c8 100644
--- a/tiny_skia/src/engine.rs
+++ b/tiny_skia/src/engine.rs
@@ -439,9 +439,13 @@ impl Engine {
let transformation = transformation * *local_transformation;
let (width, height) = buffer.size();
- let physical_bounds =
- Rectangle::new(raw.position, Size::new(width, height))
- * transformation;
+ let physical_bounds = Rectangle::new(
+ raw.position,
+ Size::new(
+ width.unwrap_or(clip_bounds.width),
+ height.unwrap_or(clip_bounds.height),
+ ),
+ ) * transformation;
if !clip_bounds.intersects(&physical_bounds) {
return;