mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-30 08:10:29 +01:00
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.
This commit is contained in:
parent
5054727927
commit
2cea2bb085
1 changed files with 0 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue