diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-04 00:12:52 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-04 00:12:52 +0200 |
commit | aee53588756f095ac970905ac434a90fcc7b9a9a (patch) | |
tree | 817459a5564a623c7dc8bb4d925aa46ddefeeed0 | |
parent | bdd8d3325eb4a7d56846c6ab8f4c40bfe37a6101 (diff) |
winwidget_render_image: Actually, use lround
-rw-r--r-- | src/winwidget.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/winwidget.c b/src/winwidget.c index 43cbf9e..8993a15 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -466,17 +466,17 @@ void winwidget_render_image(winwidget winwid, int resize, int alias) dy = 0; if (winwid->im_x < 0) - sx = 0 - round(winwid->im_x / winwid->zoom); + sx = 0 - lround(winwid->im_x / winwid->zoom); else sx = 0; if (winwid->im_y < 0) - sy = 0 - round(winwid->im_y / winwid->zoom); + sy = 0 - lround(winwid->im_y / winwid->zoom); else sy = 0; - calc_w = round(winwid->im_w * winwid->zoom); - calc_h = round(winwid->im_h * winwid->zoom); + calc_w = lround(winwid->im_w * winwid->zoom); + calc_h = lround(winwid->im_h * winwid->zoom); dw = (winwid->w - winwid->im_x); dh = (winwid->h - winwid->im_y); if (calc_w < dw) @@ -488,8 +488,8 @@ void winwidget_render_image(winwidget winwid, int resize, int alias) if (dh > winwid->h) dh = winwid->h; - sw = round(dw / winwid->zoom); - sh = round(dh / winwid->zoom); + sw = lround(dw / winwid->zoom); + sh = lround(dh / winwid->zoom); D(5, ("sx: %d sy: %d sw: %d sh: %d dx: %d dy: %d dw: %d dh: %d zoom: %f\n", |