[cairo-pattern] Extend infinite pattern extents to negative coordinates too

With things like meta-surface, the assumption that coordinates are always
non-negative make no sense.  Extend the "infinite" extents accordingly.

Also remove stale comment.  extents->width/height are unsigned these days and
cover the full range.
This commit is contained in:
Behdad Esfahbod 2008-05-09 14:05:04 +02:00
parent f81b857e1f
commit ee3672efdb

View file

@ -2066,15 +2066,10 @@ _cairo_pattern_get_extents (cairo_pattern_t *pattern,
* horizontal/vertical linear gradients).
*/
/* XXX: because extents are represented as x, y, w, h we can't
* actually have a rectangle that covers our entire valid
* coordinate space, since we'd need width/height to be 2*INT_MAX.
*/
extents->x = 0;
extents->y = 0;
extents->width = CAIRO_RECT_INT_MAX;
extents->height = CAIRO_RECT_INT_MAX;
extents->x = CAIRO_RECT_INT_MIN;
extents->y = CAIRO_RECT_INT_MIN;
extents->width = CAIRO_RECT_INT_MIN + CAIRO_RECT_INT_MAX;
extents->height = CAIRO_RECT_INT_MIN + CAIRO_RECT_INT_MAX;
return CAIRO_STATUS_SUCCESS;
}