Build rectangle with an identity matrix in place so that the entire target surface will be filled even when there is a transformation in place.

This commit is contained in:
Carl Worth 2005-04-26 19:04:48 +00:00
parent 1c316ca07a
commit 153e0c5eab
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-04-26 Carl Worth <cworth@cworth.org>
* src/cairo.c (cairo_paint): Build rectangle with an identity
matrix in place so that the entire target surface will be filled
even when there is a transformation in place.
2005-04-26 Owen Taylor <otaylor@redhat.com>
* doc/public/cairo-sections.txt: Updated.

View file

@ -1495,10 +1495,24 @@ cairo_paint (cairo_t *cr)
if (cr->status)
return;
/* Use an indentity matrix, but only while creating the path,
* since _cairo_gstate_get_clip_extents returns a rectangle in
* device space. Using an identity matrix simply saves a pair of
* conversions from device to user space then back again.
*
* The identity matrix is not used for the fill so that the source
* will be properly transformed.
*/
cairo_save (cr);
cairo_identity_matrix (cr);
cairo_rectangle (cr,
rectangle.x, rectangle.y,
rectangle.width, rectangle.height);
cairo_restore (cr);
cairo_fill (cr);
CAIRO_CHECK_SANITY (cr);