Skip to content

Commit

Permalink
ps: Fix painting
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Andrea Canciani committed Nov 24, 2010
1 parent b8347e3 commit a6b5039
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cairo-ps-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a6b5039

Please sign in to comment.