]> git.cworth.org Git - grrobot/commitdiff
* src/grr_icon.c (grr_icon_predraw): Fix scaling of all icons by
authorCarl Worth <cworth@theworths.org>
Thu, 16 Jun 2005 19:04:59 +0000 (19:04 +0000)
committerCarl Worth <cworth@theworths.org>
Thu, 16 Jun 2005 19:04:59 +0000 (19:04 +0000)
        copying the matrix from the main cairo_t to the temporary cairo_t.

ChangeLog
src/grr_icon.c

index 8cbccfdbdf47572b51d0216059183bd4594719d7..eab42dd1f626837592ce07e303887af6f649c659 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-16  Carl Worth  <cworth@cworth.org>
+
+       * 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.
+
 2005-06-16  Carl Worth  <cworth@cworth.org>
 
        * src/grr_icon.c (grr_icon_draw_predrawn): Fix inactive targets to
index d4a2bb58b979f14e42fbf3a06491ef007c1f04d3..fa76331a042a52b066d7bfea3ed5c70993d53b47 100644 (file)
@@ -238,6 +238,7 @@ void
 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 @@ grr_icon_predraw (grr_icon_t *icon, cairo_t *xrs, int width, int height)
                                                      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);
 }