[cairo-commit] src/cairo-pdf-surface.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Fri Mar 14 04:07:53 PDT 2008


 src/cairo-pdf-surface.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 7e83d6e6fb8c4b11d5d95acac4a35df8969e0944
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Mar 14 21:26:04 2008 +1030

    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

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index e6e9626..cce4b3c 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;


More information about the cairo-commit mailing list