[cairo-commit] Branch '1.10' - src/cairo-ps-surface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Wed Nov 24 04:33:25 PST 2010


 src/cairo-ps-surface.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit a6b503961b7ffd6a0725ad7d98ec1c46e2f15f25
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Nov 22 23:41:33 2010 +0100

    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.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 3ce5437..6c7ad62 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;


More information about the cairo-commit mailing list