mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-09 15:50:30 +01:00
[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:
parent
f81b857e1f
commit
ee3672efdb
1 changed files with 4 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue