summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-10-12 15:37:23 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-10-12 20:19:39 +0200
commit2cea2bb085a34650defbc18a477ddf468060b58c (patch)
tree7d3ffa63f296d277a361aa24f1302753f1077b40 /src
parent5054727927ee86c5952f8956aa0225f49e9ff66e (diff)
quartz: Make radial gradients follow PDF specification
Pixman master (soon to become pixman 0.20) implements radial gradients based on the PDF specification (section 8.7.4.5.4). Quartz natively implements them, so falling back is not needed anymore.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-quartz-surface.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 422a853e..251862f9 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -1459,23 +1459,9 @@ _cairo_quartz_setup_radial_source (cairo_quartz_surface_t *surface,
double c2y = _cairo_fixed_to_double (rpat->c2.y);
double r1 = _cairo_fixed_to_double (rpat->r1);
double r2 = _cairo_fixed_to_double (rpat->r2);
- double dx = c1x - c2x;
- double dy = c1y - c2y;
- double centerDistance = sqrt (dx*dx + dy*dy);
assert (rpat->base.n_stops > 0);
- if (r2 <= centerDistance + r1 + 1e-6 && /* circle 2 doesn't contain circle 1 */
- r1 <= centerDistance + r2 + 1e-6) { /* circle 1 doesn't contain circle 2 */
- /* Quartz handles cases where neither circle contains the other very
- * differently from pixman.
- * Whatever the correct behaviour is, let's at least have only pixman's
- * implementation to worry about.
- * Note that this also catches the cases where r1 == r2.
- */
- return _cairo_quartz_setup_fallback_source (surface, abspat);
- }
-
mat = abspat->matrix;
cairo_matrix_invert (&mat);
_cairo_quartz_cairo_matrix_to_quartz (&mat, &surface->sourceTransform);