1
0
Fork 0
forked from wry/wry

render: add a damage visualizer

This commit is contained in:
Julian Orth 2024-07-10 20:47:00 +02:00
parent 3f4a677d0c
commit 76a3c50560
18 changed files with 625 additions and 90 deletions

View file

@ -78,6 +78,10 @@ impl Region {
self.extents
}
pub fn rects(&self) -> &[Rect] {
unsafe { mem::transmute::<&[RectRaw], &[Rect]>(&self.rects[..]) }
}
pub fn contains(&self, x: i32, y: i32) -> bool {
if !self.extents.contains(x, y) {
return false;