diff options
author | 2023-09-14 01:25:40 -0400 | |
---|---|---|
committer | 2024-01-31 21:06:20 +0100 | |
commit | cdc42d64643585780f4868b68e3e1a3a706efcc6 (patch) | |
tree | cd36b198058a71ac35c6120ff88f0faa5cc2df3a /tiny_skia | |
parent | 66c8a804c6b665718a2cc80222ba8b906b543014 (diff) | |
download | iced-cdc42d64643585780f4868b68e3e1a3a706efcc6.tar.gz iced-cdc42d64643585780f4868b68e3e1a3a706efcc6.tar.bz2 iced-cdc42d64643585780f4868b68e3e1a3a706efcc6.zip |
Assert dimensions of quads are normal in `iced_tiny_skia`
Diffstat (limited to 'tiny_skia')
-rw-r--r-- | tiny_skia/src/backend.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tiny_skia/src/backend.rs b/tiny_skia/src/backend.rs index ea4a3ec6..468bcb7e 100644 --- a/tiny_skia/src/backend.rs +++ b/tiny_skia/src/backend.rs @@ -155,6 +155,15 @@ impl Backend { border, shadow, } => { + debug_assert!( + bounds.width.is_normal(), + "Quad with non-normal width!" + ); + debug_assert!( + bounds.height.is_normal(), + "Quad with non-normal height!" + ); + let physical_bounds = (*bounds + translation) * scale_factor; if !clip_bounds.intersects(&physical_bounds) { |