diff options
author | Bert Münnich <ber.t@posteo.de> | 2015-02-06 08:52:44 +0100 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2015-02-06 08:52:44 +0100 |
commit | 01ed483b50f506fcba928af43e2ca017897e7c77 (patch) | |
tree | b6249551912a84f0818abc811341a5506447c31d /image.c | |
parent | 92e3b57816e999b46f8d0778984719227631e9a7 (diff) | |
download | nsxiv-01ed483b50f506fcba928af43e2ca017897e7c77.tar.zst |
Round integer cast of image offset during rendering; fixes issue #197
Diffstat (limited to 'image.c')
-rw-r--r-- | image.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -452,7 +452,7 @@ void img_render(img_t *img) * - full image drawn on part of window */ if (img->x <= 0) { - sx = -img->x / img->zoom; + sx = -img->x / img->zoom + 0.5; sw = win->w / img->zoom; dx = 0; dw = win->w; @@ -463,7 +463,7 @@ void img_render(img_t *img) dw = img->w * img->zoom; } if (img->y <= 0) { - sy = -img->y / img->zoom; + sy = -img->y / img->zoom + 0.5; sh = win->h / img->zoom; dy = 0; dh = win->h; |