[cairo-commit] src/cairo-quartz-surface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Mon Jul 26 02:40:44 PDT 2010


 src/cairo-quartz-surface.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c1fcbd0322f86327ddd89c2eef2facbc74045629
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Jul 26 11:21:48 2010 +0200

    quartz: fix REFLECT radial gradients
    
    The interpolation range of repeating radial gradients can safely be
    reflected around any integer (previously 0), but for reflect-extended
    radial gradients can only be reflected around odd integers if the
    appearance is to be the same, thus reflecting around 1 is correct for both.
    
    Fixes radial-gradient.

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 1fad0d4..06fe181 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -1064,8 +1064,8 @@ CreateRepeatingRadialGradientFunction (cairo_quartz_surface_t *surface,
         input_value_range[0] = t_min;
         input_value_range[1] = t_max;
     } else {
-        input_value_range[0] = -t_max;
-        input_value_range[1] = -t_min;
+        input_value_range[0] = 1 - t_max;
+        input_value_range[1] = 1 - t_min;
     }
 
     if (_cairo_pattern_create_copy (&pat, &gpat->base))


More information about the cairo-commit mailing list