mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-19 00:40:36 +01:00
clip: Check whether an extents only clip contains the box
If we steal the boxes, we leave behind an extents-only clip, i.e. only without a path or boxes, in which case do not return FALSE for the is-contained check on a rectangle. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
bbdb17fc18
commit
fb3a193959
1 changed files with 3 additions and 0 deletions
|
|
@ -85,6 +85,9 @@ _cairo_clip_contains_rectangle_box (const cairo_clip_t *clip,
|
|||
if (! _cairo_rectangle_contains_rectangle (&clip->extents, rect))
|
||||
return FALSE;
|
||||
|
||||
if (clip->num_boxes == 0)
|
||||
return TRUE;
|
||||
|
||||
/* Check for a clip-box that wholly contains the rectangle */
|
||||
for (i = 0; i < clip->num_boxes; i++) {
|
||||
if (box->p1.x >= clip->boxes[i].p1.x &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue