aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2018-01-22 10:18:28 +0100
committerBert Münnich <ber.t@posteo.de>2018-01-22 10:18:32 +0100
commit4c294011a9771dd1ef38903cab31328a95224217 (patch)
tree056ed4bff266a52fed53c8601dac98a30c10d480
parentd5c5708110bcaa60815d7648260f9688bbd12824 (diff)
Use float for ox/oy compare values
Fixes issue #302
-rw-r--r--image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/image.c b/image.c
index 6803846..e7a5ca6 100644
--- a/image.c
+++ b/image.c
@@ -366,8 +366,7 @@ CLEANUP void img_close(img_t *img, bool decache)
void img_check_pan(img_t *img, bool moved)
{
win_t *win;
- int ox, oy;
- float w, h;
+ float w, h, ox, oy;
win = img->win;
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)
{
- int ox, oy;
+ float ox, oy;
ox = img->x;
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)
{
- int i, ox, oy, tmp;
+ int i, tmp;
+ float ox, oy;
imlib_context_set_image(img->im);
imlib_image_orientate(d);