mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 17:40:01 +00:00
Add static_assert() to check that Pixman constants match gfx::Region::Overlap
This commit is contained in:
parent
9d2fd2498b
commit
24e0939ad2
@ -154,6 +154,11 @@ bool Region::contains(const PointT<int>& pt) const
|
||||
|
||||
Region::Overlap Region::contains(const Rect& rect) const
|
||||
{
|
||||
static_assert(
|
||||
Out == PIXMAN_REGION_OUT &&
|
||||
In == PIXMAN_REGION_IN &&
|
||||
Part == PIXMAN_REGION_PART, "Pixman constants have changed");
|
||||
|
||||
pixman_box32 box = { rect.x, rect.y, rect.x2(), rect.y2() };
|
||||
return (Region::Overlap)pixman_region32_contains_rectangle(&m_region, &box);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user