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 <marco@src.gnome.org>2005-07-29 16:24:40 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-07-29 16:24:40 (GMT)
commit3419ad56996f478e62f836563a9e507e90da9ba0 (patch)
tree7e10c0f06a5de0f25a8b4bdbba6f96f65c3c624c /shell
parent246a567bc3015f1da65d4e4d5ea62722391ab39e (diff)
*** empty log message ***
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-page-cache.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/shell/ev-page-cache.c b/shell/ev-page-cache.c
index d7aa03d..c39053a 100644
--- a/shell/ev-page-cache.c
+++ b/shell/ev-page-cache.c
@@ -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;
}
}