diff options
author | rbuj <[email protected]> | 2022-07-27 10:54:59 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-09-11 17:27:42 +0000 |
commit | c2ca77ad7ca7771d5bea52cf4bf4ce4f15b1c291 (patch) | |
tree | b31e14a1a49c2033c426f69d7b33a7b350de20f0 /src | |
parent | 2b1f1acf3ba1d2d1075919f0eabc83f7d208cb8c (diff) | |
download | eom-c2ca77ad7ca7771d5bea52cf4bf4ce4f15b1c291.tar.bz2 eom-c2ca77ad7ca7771d5bea52cf4bf4ce4f15b1c291.tar.xz |
eom-scroll-view.c: fix -Wbad-function-cast warning
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-scroll-view.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index d438021..24a1f0f 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -1294,7 +1294,8 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data) cairo_matrix_init_identity (&matrix); if (transform) { cairo_matrix_t affine; - double image_offset_x = 0., image_offset_y = 0.; + int image_offset_x = 0; + int image_offset_y = 0; eom_transform_get_affine (transform, &affine); cairo_matrix_multiply (&matrix, &affine, &matrix); @@ -1302,23 +1303,23 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data) switch (eom_transform_get_transform_type (transform)) { case EOM_TRANSFORM_ROT_90: case EOM_TRANSFORM_FLIP_HORIZONTAL: - image_offset_x = (double) gdk_pixbuf_get_width (priv->pixbuf); + image_offset_x = gdk_pixbuf_get_width (priv->pixbuf); break; case EOM_TRANSFORM_ROT_270: case EOM_TRANSFORM_FLIP_VERTICAL: - image_offset_y = (double) gdk_pixbuf_get_height (priv->pixbuf); + image_offset_y = gdk_pixbuf_get_height (priv->pixbuf); break; case EOM_TRANSFORM_ROT_180: case EOM_TRANSFORM_TRANSPOSE: case EOM_TRANSFORM_TRANSVERSE: - image_offset_x = (double) gdk_pixbuf_get_width (priv->pixbuf); - image_offset_y = (double) gdk_pixbuf_get_height (priv->pixbuf); + image_offset_x = gdk_pixbuf_get_width (priv->pixbuf); + image_offset_y = gdk_pixbuf_get_height (priv->pixbuf); break; case EOM_TRANSFORM_NONE: default: break; } - cairo_matrix_init_translate (&translate, image_offset_x, image_offset_y); + cairo_matrix_init_translate (&translate, (double) image_offset_x, (double) image_offset_y); cairo_matrix_multiply (&matrix, &matrix, &translate); } /* Zoom factor for SVGs is already scaled, so scale back to application pixels. */ |