[cairo-commit] src/cairo-pdf-surface.c test/get-path-extents.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Mon Jan 24 01:59:35 PST 2011


 src/cairo-pdf-surface.c |   12 ------------
 test/get-path-extents.c |    3 +--
 2 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 062e78b620cd6161f0a2fd2644866fb5d957a9db
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Jan 24 10:35:23 2011 +0100

    Fix regressions from 1.10 merge
    
    d6dc6e8e396506d5160266dda6575ddfce671c2d introduced two regressions:
    
     - the compiler warns about _gradient_stops_are_opaque being unused in
       cairo-pdf-surface.c
    
     - get-path-extents now checks for the wrong extents, thus it fails

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 00cc4fb..c915b3f 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1245,18 +1245,6 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t	*surface,
     return status;
 }
 
-static cairo_bool_t
-_gradient_stops_are_opaque (const cairo_gradient_pattern_t *gradient)
-{
-    unsigned int i;
-
-    for (i = 0; i < gradient->n_stops; i++)
-	if (! CAIRO_COLOR_IS_OPAQUE (&gradient->stops[i].color))
-	    return FALSE;
-
-    return TRUE;
-}
-
 static cairo_status_t
 _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t		*surface,
 				    const cairo_pattern_t	*pattern,
diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index a9a6ad1..5bd3eb7 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -148,8 +148,7 @@ draw (cairo_t *cr, int width, int height)
     phase = "Degenerate arc (R=0)";
     errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
     errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 0, 0, 0, 0);
-    /*XXX: I'd expect these extents to be oriented at 200, 400 */
-    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 0, 0, 0);
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 200, 400, 0, 0);
 
     cairo_new_path (cr2);
     cairo_arc (cr2, 200, 400, 10., 0, 0);


More information about the cairo-commit mailing list