Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-09-19 15:07:36 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-09-19 15:07:36 (GMT)
commit7d9e5143adb83d52169fae99f3c07b953e948d8e (patch)
tree419e5537ca8b1ba07e99413078f03f89e7b1ee29 /shell
parentb9aef17e3af39e3b9364a3e2a8d7fa56d735fc4c (diff)
Dont cast to int before scaling
2005-09-19 Marco Pesenti Gritti <mpg@redhat.com> * shell/ev-page-cache.c: (ev_page_cache_get_size): Dont cast to int before scaling
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-page-cache.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c
index 7409ded..a79ba05 100644
--- a/shell/ev-page-cache.c
+++ b/shell/ev-page-cache.c
@@ -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;
}
}