[Commit] grrobot/src grr_icon.c,1.8,1.9

Carl Worth commit at keithp.com
Thu Jun 16 12:05:02 PDT 2005


Committed by: cworth

Update of /local/src/CVS/grrobot/src
In directory home.keithp.com:/tmp/cvs-serv3311/src

Modified Files:
	grr_icon.c 
Log Message:

        * src/grr_icon.c (grr_icon_predraw): Fix scaling of all icons by
        copying the matrix from the main cairo_t to the temporary cairo_t.


Index: grr_icon.c
===================================================================
RCS file: /local/src/CVS/grrobot/src/grr_icon.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- grr_icon.c	16 Jun 2005 18:49:33 -0000	1.8
+++ grr_icon.c	16 Jun 2005 19:04:59 -0000	1.9
@@ -238,6 +238,7 @@
 grr_icon_predraw (grr_icon_t *icon, cairo_t *xrs, int width, int height)
 {
     cairo_t *xrs2;
+    cairo_matrix_t ctm;
 
     if (icon->surface_width != width || icon->surface_height != height) {
 	if (icon->surface)
@@ -249,7 +250,10 @@
 						      width, height);
     }
 
+    /* Need to copy the CTM from the original cairo_t to the new one */
     xrs2 = cairo_create (icon->surface);
+    cairo_get_matrix (xrs, &ctm);
+    cairo_set_matrix (xrs2, &ctm);
     grr_icon_draw (icon, xrs2);
     cairo_destroy (xrs2);
 }




More information about the Commit mailing list