mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
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:
parent
1c316ca07a
commit
153e0c5eab
2 changed files with 20 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
14
src/cairo.c
14
src/cairo.c
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue