void rot2(GdkPixbuf *src, GdkPixbuf *dist, gint r, gfloat m) { gint w1, h1, w2, h2; gint x1, y1, x2, y2; gint px1, py1, px2, py2; gint i, j; guint32 *ptr1, *ptr2; guchar *ptr; w1 = gdk_pixbuf_get_width(src); h1 = gdk_pixbuf_get_height(src); w2 = gdk_pixbuf_get_width(dist); h2 = gdk_pixbuf_get_height(dist); px1 = w1 / 2; py1 = h1 / 2; px2 = w2 / 2; py2 = h2 / 2; ptr2 = (guint32*)gdk_pixbuf_get_pixels(dist); for(j=0; j= 0) && (x1 < w1) && (y1 >= 0) && (y1 < h1)) { ptr = gdk_pixbuf_get_pixels(src) + gdk_pixbuf_get_rowstride(src) * y1 + (x1 * 4); ptr1 = (guint32 *)ptr; *ptr2 = *ptr1; } else { *ptr2 = 0; } ptr2++; } } }