From 2cea2bb085a34650defbc18a477ddf468060b58c Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Tue, 12 Oct 2010 15:37:23 +0200 Subject: [PATCH] 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. --- src/cairo-quartz-surface.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index 422a853e2..251862f97 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);