From a6b503961b7ffd6a0725ad7d98ec1c46e2f15f25 Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Mon, 22 Nov 2010 23:41:33 +0100 Subject: [PATCH] ps: Fix painting Painting of some pattern was broken because the paint operation was implemented as a fill to a rect containing the clip, but this rect was not transformed as appropriate (using the cairo_to_ps matrix). PDF simply fills the whole surface rect, so we implement the same behavior in PS. Fixes clip-group-shapes-circles, clip-stroke, linear-gradient-extend, linear-gradient-one-stop, radial-gradient-one-stop. --- src/cairo-ps-surface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 3ce5437b2..6c7ad6229 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -3543,9 +3543,8 @@ _cairo_ps_surface_paint (void *abstract_surface, if (unlikely (status)) return status; - _cairo_output_stream_printf (stream, "%d %d %d %d rectfill\n", - extents.bounded.x, extents.bounded.y, - extents.bounded.width, extents.bounded.height); + _cairo_output_stream_printf (stream, "0 0 %f %f rectfill\n", + surface->width, surface->height); } return CAIRO_STATUS_SUCCESS;