]> www.fi.muni.cz Git - evince.git/commitdiff
*** empty log message ***
authorMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 29 Jul 2005 16:24:40 +0000 (16:24 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 29 Jul 2005 16:24:40 +0000 (16:24 +0000)
shell/ev-page-cache.c
thumbnailer/evince-thumbnailer.c

index d7aa03db8f1d815120e9050c00670c3e2a844866..c39053aec90633229164b33b2fd901da2ce63fe8 100644 (file)
@@ -367,35 +367,32 @@ ev_page_cache_get_size (EvPageCache  *page_cache,
                        gint         *width,
                        gint         *height)
 {
+       int w, h;
+
        g_return_if_fail (EV_IS_PAGE_CACHE (page_cache));
        g_return_if_fail (page >= 0 && page < page_cache->n_pages);
 
        if (page_cache->uniform) {
-               if (width)
-                       *width = page_cache->uniform_width;
-               if (height)
-                       *height = page_cache->uniform_height;
+               w = page_cache->uniform_width;
+               h = page_cache->uniform_height;
        } else {
                EvPageCacheInfo *info;
 
                info = &(page_cache->size_cache [page]);
                
-               if (width)
-                       *width = info->width;
-               if (height)
-                       *height = info->height;
+               w = info->width;
+               h = info->height;
        }
 
+       w = (int) (w * scale + 0.5);
+       h = (int) (h * scale + 0.5);
+
        if (rotation == 0 || rotation == 180) {
-               if (width)
-                       *width = (int) ((*width) * scale + 0.5);
-               if (height)
-                       *height = (int) ((*height) * scale + 0.5);
+               if (width) *width = w;
+               if (height) *height = h;
        } else {
-               if (width)
-                       *width = (int) ((*height) * scale + 0.5);
-               if (height)
-                       *height = (int) ((*width) * scale + 0.5);
+               if (width) *width = h;
+               if (height) *height = w;
        }
 }
 
index 9c9bff26e253c514b378179ed1adf073987391ea..b72eb7474bb501f488c3b33bd4167f5118ec5da6 100644 (file)
@@ -86,8 +86,7 @@ evince_thumbnail_pngenc_get (const char *uri, const char *thumbnail, int size)
        }
 
        pixbuf = ev_document_thumbnails_get_thumbnail
-                       (EV_DOCUMENT_THUMBNAILS (document), 0,
-                        EV_ORIENTATION_PORTRAIT, size, FALSE);
+                       (EV_DOCUMENT_THUMBNAILS (document), 0, 0, size, FALSE);
        
        if (pixbuf != NULL) {
                const char *overlaid_icon_name = NULL;