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)
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);
}