Round integer cast of image offset during rendering; fixes issue #197
This commit is contained in:
parent
92e3b57816
commit
01ed483b50
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION := git-20150118
|
VERSION := git-20150206
|
||||||
|
|
||||||
PREFIX := /usr/local
|
PREFIX := /usr/local
|
||||||
MANPREFIX := $(PREFIX)/share/man
|
MANPREFIX := $(PREFIX)/share/man
|
||||||
|
4
image.c
4
image.c
@ -452,7 +452,7 @@ void img_render(img_t *img)
|
|||||||
* - full image drawn on part of window
|
* - full image drawn on part of window
|
||||||
*/
|
*/
|
||||||
if (img->x <= 0) {
|
if (img->x <= 0) {
|
||||||
sx = -img->x / img->zoom;
|
sx = -img->x / img->zoom + 0.5;
|
||||||
sw = win->w / img->zoom;
|
sw = win->w / img->zoom;
|
||||||
dx = 0;
|
dx = 0;
|
||||||
dw = win->w;
|
dw = win->w;
|
||||||
@ -463,7 +463,7 @@ void img_render(img_t *img)
|
|||||||
dw = img->w * img->zoom;
|
dw = img->w * img->zoom;
|
||||||
}
|
}
|
||||||
if (img->y <= 0) {
|
if (img->y <= 0) {
|
||||||
sy = -img->y / img->zoom;
|
sy = -img->y / img->zoom + 0.5;
|
||||||
sh = win->h / img->zoom;
|
sh = win->h / img->zoom;
|
||||||
dy = 0;
|
dy = 0;
|
||||||
dh = win->h;
|
dh = win->h;
|
||||||
|
Loading…
Reference in New Issue
Block a user