diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-19 13:16:43 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-19 13:16:43 +0100 |
| commit | 70c0dd767452772d29167e39b1c4f919519422ce (patch) | |
| tree | 6e4953cb7c046845c9d80d03d089c2ca52ab6ffc /tests | |
| parent | 5a59bb48216352d04f78c9a9392ca7cef280d7b2 (diff) | |
Small fixes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typeset.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index a287638a..11e0090f 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -437,8 +437,13 @@ fn draw_frame( let h = frame.size.h.to_pt() as f32; let rect = sk::Rect::from_xywh(0.0, 0.0, w, h).unwrap(); let path = sk::PathBuilder::from_rect(rect).transform(ts).unwrap(); + let rule = sk::FillRule::default(); storage = mask.clone(); - storage.intersect_path(&path, sk::FillRule::default(), false); + if storage.intersect_path(&path, rule, false).is_none() { + // Fails if clipping rect is empty. In that case we just clip everything + // by returning. + return; + } &storage } else { mask |
