From 7e83d6e6fb8c4b11d5d95acac4a35df8969e0944 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Fri, 14 Mar 2008 21:26:04 +1030 Subject: [PATCH] Do not use PDF fill-stroke operator with transparent fill because the PDF rendering does not match cairo. See PDF Reference 7.6.3. Bug report at https://bugs.launchpad.net/inkscape/+bug/202096 --- src/cairo-pdf-surface.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index e6e962634..cce4b3c03 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -4536,19 +4536,14 @@ _cairo_pdf_surface_fill_stroke (void *abstract_surface, if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) return CAIRO_INT_STATUS_UNSUPPORTED; - /* Fill-stroke with patterns requiring an SMask are not currently - * implemented. Non opaque stroke patterns are not supported - * because the PDF fill-stroke operator does not blend a - * transparent stroke with the fill. + /* PDF rendering of fill-stroke is not the same as cairo when + * either the fill or stroke is not opaque. */ - if (fill_source->type == CAIRO_PATTERN_TYPE_LINEAR || - fill_source->type == CAIRO_PATTERN_TYPE_RADIAL) + if ( !_cairo_pattern_is_opaque (fill_source) || + !_cairo_pattern_is_opaque (stroke_source)) { - if (!_cairo_pattern_is_opaque (fill_source)) - return CAIRO_INT_STATUS_UNSUPPORTED; - } - if (!_cairo_pattern_is_opaque (stroke_source)) return CAIRO_INT_STATUS_UNSUPPORTED; + } fill_pattern_res.id = 0; gstate_res.id = 0;