Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dvi/dvi-document.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-08-25 20:10:01 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2005-08-25 20:10:01 (GMT)
commit7399cf0e5de076aae5cc2b3545f07c2af4bab5be (patch)
treec86e612ec18c65bcef904ac7b7ca1ccd3d1e6337 /dvi/dvi-document.c
parent70406cb1287e812e39ef0af769b9fcc6cc727503 (diff)
Fix rotation of thumbnails, ported to new API. Moved library dependencies
* djvu/djvu-document.c: (djvu_document_thumbnails_get_thumbnail): * dvi/Makefile.am: * dvi/dvi-document.c: (dvi_document_thumbnails_get_thumbnail): * dvi/mdvi-lib/Makefile.am: Fix rotation of thumbnails, ported to new API. Moved library dependencies earlier, probably it will fix linkage problem.
Diffstat (limited to 'dvi/dvi-document.c')
-rw-r--r--dvi/dvi-document.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/dvi/dvi-document.c b/dvi/dvi-document.c
index 1bb465c..d462758 100644
--- a/dvi/dvi-document.c
+++ b/dvi/dvi-document.c
@@ -310,19 +310,15 @@ dvi_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
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, 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;
}