-}
-
-static EvDocumentInfo *
-dvi_document_get_info (EvDocument *document)
-{
- EvDocumentInfo *info;
-
- info = g_new0 (EvDocumentInfo, 1);
-
- return info;
-}
-
-static void
-dvi_document_document_iface_init (EvDocumentIface *iface)
-{
- iface->load = dvi_document_load;
- iface->save = dvi_document_save;
- iface->get_n_pages = dvi_document_get_n_pages;
- iface->get_page_size = dvi_document_get_page_size;
- iface->render = dvi_document_render;
- iface->get_info = dvi_document_get_info;
-}
-
-static void
-dvi_document_thumbnails_get_dimensions (EvDocumentThumbnails *document,
- EvRenderContext *rc,
- gint *width,
- gint *height)
-{
- DviDocument *dvi_document = DVI_DOCUMENT (document);
- gdouble page_width = dvi_document->base_width;
- gdouble page_height = dvi_document->base_height;
-
- if (rc->rotation == 90 || rc->rotation == 270) {
- *width = (gint) (page_height * rc->scale);
- *height = (gint) (page_width * rc->scale);
- } else {
- *width = (gint) (page_width * rc->scale);
- *height = (gint) (page_height * rc->scale);
- }
-}
-
-static GdkPixbuf *
-dvi_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
- EvRenderContext *rc,
- gboolean border)
-{
- DviDocument *dvi_document = DVI_DOCUMENT (document);
- GdkPixbuf *pixbuf;
- GdkPixbuf *rotated_pixbuf;
- cairo_surface_t *surface;
- gint thumb_width, thumb_height;
- gint proposed_width, proposed_height;
-
- thumb_width = (gint) (dvi_document->base_width * rc->scale);
- thumb_height = (gint) (dvi_document->base_height * rc->scale);
-
- g_mutex_lock (dvi_context_mutex);
-
- mdvi_setpage (dvi_document->context, rc->page);
-
- mdvi_set_shrink (dvi_document->context,
- (int)dvi_document->base_width * dvi_document->params->hshrink / thumb_width,
- (int)dvi_document->base_height * dvi_document->params->vshrink / thumb_height);
-
- proposed_width = dvi_document->context->dvi_page_w * dvi_document->context->params.conv;
- proposed_height = dvi_document->context->dvi_page_h * dvi_document->context->params.vconv;
-
- if (border) {
- mdvi_cairo_device_set_margins (&dvi_document->context->device,
- MAX (thumb_width - proposed_width, 0) / 2,
- MAX (thumb_height - proposed_height, 0) / 2);
- } else {
- mdvi_cairo_device_set_margins (&dvi_document->context->device,
- MAX (thumb_width - proposed_width - 2, 0) / 2,
- MAX (thumb_height - proposed_height - 2, 0) / 2);
- }