double base_width;
double base_height;
+
+ gchar *uri;
};
typedef struct _DviDocumentClass DviDocumentClass;
dvi_context_mutex = g_mutex_new ();
+ g_free (dvi_document->uri);
+ dvi_document->uri = g_strdup (uri);
return TRUE;
}
const char *uri,
GError **error)
{
- g_warning ("dvi_document_save not implemented"); /* FIXME */
- return TRUE;
+ DviDocument *dvi_document = DVI_DOCUMENT (document);
+
+ return ev_xfer_uri_simple (dvi_document->uri, uri, error);
}
static int
g_mutex_unlock (dvi_context_mutex);
- rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, rc->rotation);
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, 360 - rc->rotation);
g_object_unref (pixbuf);
return rotated_pixbuf;
if (dvi_document->params)
g_free (dvi_document->params);
+
+ g_free (dvi_document->uri);
G_OBJECT_CLASS (dvi_document_parent_class)->finalize (object);
}
pixbuf = mdvi_pixbuf_device_get_pixbuf (&dvi_document->context->device);
g_mutex_unlock (dvi_context_mutex);
-
- if (border) {
- border_pixbuf = ev_document_misc_get_thumbnail_frame (thumb_width, thumb_height, NULL);
- gdk_pixbuf_copy_area (pixbuf, 0, 0,
- thumb_width - 2, thumb_height - 2,
- border_pixbuf, 2, 2);
- g_object_unref (pixbuf);
- pixbuf = border_pixbuf;
- }
-
- rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, rotation);
+ rotated_pixbuf = gdk_pixbuf_rotate_simple (pixbuf, 360 - rotation);
g_object_unref (pixbuf);
+
+ if (border) {
+ GdkPixbuf *tmp_pixbuf = rotated_pixbuf;
+ rotated_pixbuf = ev_document_misc_get_thumbnail_frame (-1, -1, 0, tmp_pixbuf);
+ g_object_unref (tmp_pixbuf);
+ }
return rotated_pixbuf;
}