Closed nils-mathieu closed 2 months ago
My mistake, I completely forgot about this. I just commited the suggested modifications.
@nils-mathieu Could you please rebase this on top of current main
to pick up the CI changes / updates? Thanks!
Github's autosync merged rather than rebasing without asking, I hope it's okay. Seems green though x)
One last thing (from me): Could you add an entry to CHANGELOG.md
? Just use the existing format, add the PR number sorted numerically and your GitHub user name sorted alphabetically and an entry for this under 'Added'.
done!
Thanks everyone!
I stumbled on this while toying with the
vello
rendering engine (which is great btw, you guys are doing god's work). I'm trying to create a simple audio sequencer with it and while trying to determine whether shapes were visible on screen, I found that there was no way of checking for the intersection of twoRect
s.Right now, the only way to do that is to compute their intersection, then verify whether it's empty or not.
This is not ideal for two reasons:
This pull request adds
Rect::overlaps
andRect::contains_rect
, which do exactly that.