diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2010-10-13 19:23:45 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2010-10-15 15:26:39 +1030 |
commit | 22cdb7041f4ecbcac708583bc195d13934be6cf7 (patch) | |
tree | e2ff8bdccffdb2bb84145529773a684efab9b380 | |
parent | d3655e04b2e27bacdeeddbaf0c4a212b9b93b6ee (diff) |
PS: Remove radial gradient fallback
when one circle not inside the other. Pixman now follows the PDF
specification.
-rw-r--r-- | src/cairo-ps-surface.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 1b091dbae..4e8aa0aab 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -1737,28 +1737,13 @@ _gradient_pattern_supported (cairo_ps_surface_t *surface, extend = cairo_pattern_get_extend ((cairo_pattern_t *) pattern); - /* Radial gradients are currently only supported when one circle - * is inside the other. */ + /* Radial gradients are currently only supported with EXTEND_NONE + * and EXTEND_PAD. */ if (pattern->type == CAIRO_PATTERN_TYPE_RADIAL) { - double x1, y1, x2, y2, r1, r2, d; - cairo_radial_pattern_t *radial = (cairo_radial_pattern_t *) pattern; - if (extend == CAIRO_EXTEND_REPEAT || extend == CAIRO_EXTEND_REFLECT) { return FALSE; } - - x1 = _cairo_fixed_to_double (radial->c1.x); - y1 = _cairo_fixed_to_double (radial->c1.y); - r1 = _cairo_fixed_to_double (radial->r1); - x2 = _cairo_fixed_to_double (radial->c2.x); - y2 = _cairo_fixed_to_double (radial->c2.y); - r2 = _cairo_fixed_to_double (radial->r2); - - d = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - if (d > fabs(r2 - r1)) { - return FALSE; - } } surface->ps_level_used = CAIRO_PS_LEVEL_3; |