]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-page-cache.c
Minor thing fixed
[evince.git] / shell / ev-page-cache.c
index 7409ded1c03401c6868ad362628e417629c6828f..a79ba056e73f8ac542eddb9f63782cb434a0f786 100644 (file)
@@ -357,7 +357,7 @@ ev_page_cache_get_size (EvPageCache  *page_cache,
                        gint         *width,
                        gint         *height)
 {
-       int w, h;
+       double w, h;
 
        g_return_if_fail (EV_IS_PAGE_CACHE (page_cache));
        g_return_if_fail (page >= 0 && page < page_cache->n_pages);
@@ -374,15 +374,15 @@ ev_page_cache_get_size (EvPageCache  *page_cache,
                h = info->height;
        }
 
-       w = (int) (w * scale + 0.5);
-       h = (int) (h * scale + 0.5);
+       w = w * scale + 0.5;
+       h = h * scale + 0.5;
 
        if (rotation == 0 || rotation == 180) {
-               if (width) *width = w;
-               if (height) *height = h;
+               if (width) *width = (int)w;
+               if (height) *height = (int)h;
        } else {
-               if (width) *width = h;
-               if (height) *height = w;
+               if (width) *width = (int)h;
+               if (height) *height = (int)w;
        }
 }