X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=dvi%2Fdvi-document.c;h=d4627580259b966b10e0c89944db48b4fd4f3e38;hb=e69764da3aebb5017080dbe59747e2983e3a9788;hp=05bc5b617b27b2e405a44499c9aa399e32261840;hpb=2a08b88d7fc1397335cc85812b8f2bd4d53125d9;p=evince.git diff --git a/dvi/dvi-document.c b/dvi/dvi-document.c index 05bc5b61..d4627580 100644 --- a/dvi/dvi-document.c +++ b/dvi/dvi-document.c @@ -191,7 +191,7 @@ dvi_document_render_pixbuf (EvDocument *document, 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; @@ -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, 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; }