From 31565677dbbc3212635ec95951a236e4243a2552 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 11 Aug 2008 18:21:53 +0100 Subject: [PATCH] [pattern] Unbounded patterns should have infinite extents. Fix a slight typo that produced negative sized extents instead of the maximum. --- src/cairo-pattern.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 0c84a8e3a..3dfd7c803 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -2093,10 +2093,11 @@ _cairo_pattern_get_extents (cairo_pattern_t *pattern, * horizontal/vertical linear gradients). */ + /* unbounded patterns -> 'infinite' extents */ 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; + extents->width = CAIRO_RECT_INT_MAX - CAIRO_RECT_INT_MIN; + extents->height = CAIRO_RECT_INT_MAX - CAIRO_RECT_INT_MIN; return CAIRO_STATUS_SUCCESS; }