mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-01 02:08:07 +02:00
[cairo-clip] Special case using an empty clip path.
Detect when the user calls cairo_clip() with an empty clip path and mark the clip as all_clipped.
This commit is contained in:
parent
2f0867b43f
commit
b4057b8643
1 changed files with 6 additions and 0 deletions
|
|
@ -537,6 +537,12 @@ _cairo_clip_clip (cairo_clip_t *clip,
|
|||
if (clip->all_clipped)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
/* catch the empty clip path */
|
||||
if (! path->has_current_point) {
|
||||
_cairo_clip_set_all_clipped (clip, target);
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
status = _cairo_clip_intersect_path (clip,
|
||||
path, fill_rule, tolerance,
|
||||
antialias);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue