- return gdk_pixbuf_scale_simple (pixbuf_document->pixbuf,
- gdk_pixbuf_get_width (pixbuf_document->pixbuf) * scale,
- gdk_pixbuf_get_height (pixbuf_document->pixbuf) * scale,
- GDK_INTERP_BILINEAR);
+ GdkPixbuf *scaled_pixbuf, *rotated_pixbuf;
+
+ scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf_document->pixbuf,
+ gdk_pixbuf_get_width (pixbuf_document->pixbuf) * rc->scale,
+ gdk_pixbuf_get_height (pixbuf_document->pixbuf) * rc->scale,
+ GDK_INTERP_BILINEAR);
+
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (scaled_pixbuf, rc->rotation);
+ g_object_unref (scaled_pixbuf);
+
+ return rotated_pixbuf;