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

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Wed Feb 20 12:50:39 PST 2008


 src/cairo-svg-surface.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c5d056aaebe51d2c3430807de559b0d8ab3431d5
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Wed Feb 20 21:42:24 2008 +0100

    [SVG] Fix the extend-reflect-similar test failure.
    
    SVG doesn't support extend reflect for image pattern, and there isn't
    any trivial way to emulate this feature. So we use the image fallback
    for now. This fix also forces an image fallback for extend-reflect, but
    in the end, it generates more or less the same file (one big image for
    the pattern). No other test is forced to use an image fallback by this
    patch.

diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 895cb5e..fdd1c67 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -752,13 +752,18 @@ _cairo_svg_surface_analyze_operation (cairo_svg_surface_t   *surface,
     if (cairo_svg_force_fallbacks)
 	return FALSE;
 
+    /* SVG doesn't support extend reflect for image pattern */
+    if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE &&
+	pattern->extend == CAIRO_EXTEND_REFLECT)
+	return CAIRO_INT_STATUS_UNSUPPORTED;
+
     if (document->svg_version >= CAIRO_SVG_VERSION_1_2)
 	return CAIRO_STATUS_SUCCESS;
 
     if (op == CAIRO_OPERATOR_OVER)
 	return CAIRO_STATUS_SUCCESS;
 
-    /* The SOURCE operator is onlysupported if there is nothing
+    /* The SOURCE operator is only supported if there is nothing
      * painted underneath. */
     if (op == CAIRO_OPERATOR_SOURCE)
 	return CAIRO_INT_STATUS_FLATTEN_TRANSPARENCY;


More information about the cairo-commit mailing list