Use float for ox/oy compare values

Fixes issue #302
This commit is contained in:
Bert Münnich 2018-01-22 10:18:28 +01:00
parent d5c5708110
commit 4c294011a9

View file

@ -366,8 +366,7 @@ CLEANUP void img_close(img_t *img, bool decache)
void img_check_pan(img_t *img, bool moved) void img_check_pan(img_t *img, bool moved)
{ {
win_t *win; win_t *win;
int ox, oy; float w, h, ox, oy;
float w, h;
win = img->win; win = img->win;
w = img->w * img->zoom; w = img->w * img->zoom;
@ -640,7 +639,7 @@ bool img_pan(img_t *img, direction_t dir, int d)
bool img_pan_edge(img_t *img, direction_t dir) bool img_pan_edge(img_t *img, direction_t dir)
{ {
int ox, oy; float ox, oy;
ox = img->x; ox = img->x;
oy = img->y; oy = img->y;
@ -666,7 +665,8 @@ bool img_pan_edge(img_t *img, direction_t dir)
void img_rotate(img_t *img, degree_t d) void img_rotate(img_t *img, degree_t d)
{ {
int i, ox, oy, tmp; int i, tmp;
float ox, oy;
imlib_context_set_image(img->im); imlib_context_set_image(img->im);
imlib_image_orientate(d); imlib_image_orientate(d);