Fix regressions from 1.10 merge

d6dc6e8e39 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
This commit is contained in:
Andrea Canciani 2011-01-24 10:35:23 +01:00
parent c7b16098bd
commit 062e78b620
2 changed files with 1 additions and 14 deletions

View file

@ -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,

View file

@ -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);