Krolyxon
Commit 4c29401

Branches

Refs →

nsxiv4c29401

Use float for ox/oy compare values

Fixes issue #302
Author
Bert Münnich
Date
2018-01-22 10:18 +0100
Committer
Bert Münnich · 2018-01-22 10:18 +0100
Parent
d5c5708
Commit
4c294011a9771dd1ef38903cab31328a95224217

+4 −4

1 file changed

  1. M image.c +4 −4
M image.c View
@@ -366,8 +366,7 @@ CLEANUP void img_close(img_t *img, bool decache)
366366 void img_check_pan(img_t *img, bool moved)
367367 {
368368 win_t *win;
369− int ox, oy;
370− float w, h;
369+ float w, h, ox, oy;
371370
372371 win = img->win;
373372 w = img->w * img->zoom;
@@ -640,7 +639,7 @@ bool img_pan(img_t *img, direction_t dir, int d)
640639
641640 bool img_pan_edge(img_t *img, direction_t dir)
642641 {
643− int ox, oy;
642+ float ox, oy;
644643
645644 ox = img->x;
646645 oy = img->y;
@@ -666,7 +665,8 @@ bool img_pan_edge(img_t *img, direction_t dir)
666665
667666 void img_rotate(img_t *img, degree_t d)
668667 {
669− int i, ox, oy, tmp;
668+ int i, tmp;
669+ float ox, oy;
670670
671671 imlib_context_set_image(img->im);
672672 imlib_image_orientate(d);