diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-02-17 16:34:23 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-02-17 16:34:23 +0100 |
commit | 971773384b23131fddf6fc389fa436a504e41de9 (patch) | |
tree | 8576fb86eff4ef326c258895c609112e9f5f25a7 | |
parent | 26c5b862a326ecdecb23827b0bcb40528517f813 (diff) |
fix tangent circles
-rw-r--r-- | pixman/pixman-radial-gradient.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c index d6f5a45..a2d1c5d 100644 --- a/pixman/pixman-radial-gradient.c +++ b/pixman/pixman-radial-gradient.c @@ -97,9 +97,15 @@ radial_compute_color (double a, if (a == 0) { - _pixman_gradient_walker_pixel (walker, - 1. / 2 * c / b, - buffer); + if (b != 0) { + double t = 1. / 2 * c / b; + + if (t * dr * pixman_fixed_1 > mindr) { + _pixman_gradient_walker_pixel (walker, t, buffer); + return; + } + } + memset (buffer, 0, sizeof (pixman_component_t) * walker->num_components); return; } |