GObject parent_instance;
GdkPixbuf *pixbuf;
+
+ gchar *uri;
};
typedef struct _PixbufDocumentClass PixbufDocumentClass;
return FALSE;
pixbuf_document->pixbuf = pixbuf;
+ g_free (pixbuf_document->uri);
+ pixbuf_document->uri = g_strdup (uri);
return TRUE;
}
const char *uri,
GError **error)
{
- g_warning ("pixbuf_document_save not implemented"); /* FIXME */
- return TRUE;
+ PixbufDocument *pixbuf_document = PIXBUF_DOCUMENT (document);
+
+ return ev_xfer_uri_simple (pixbuf_document->uri, uri, error);
}
static int
gdk_pixbuf_get_height (pixbuf_document->pixbuf) * rc->scale,
GDK_INTERP_BILINEAR);
- rotated_pixbuf = gdk_pixbuf_rotate_simple (scaled_pixbuf, rc->rotation);
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (scaled_pixbuf, 360 - rc->rotation);
g_object_unref (scaled_pixbuf);
return rotated_pixbuf;
PixbufDocument *pixbuf_document = PIXBUF_DOCUMENT (object);
g_object_unref (pixbuf_document->pixbuf);
+ g_free (pixbuf_document->uri);
G_OBJECT_CLASS (pixbuf_document_parent_class)->finalize (object);
}
pixbuf = gdk_pixbuf_scale_simple (pixbuf_document->pixbuf, size, height,
GDK_INTERP_BILINEAR);
- rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, rotation);
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, 360 - rotation);
g_object_unref (pixbuf);
return rotated_pixbuf;