summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasne@redhat.com>2008-02-10 06:27:46 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-02-10 06:27:46 +0000
commitdaa29b8716663470ca56c21367d78336d569f5c8 (patch)
tree894c7f7d2415a190fa9ec2f7cbdffd9ca97f0a9b /gdk-pixbuf
parenteeedb81c8b0412b9427a4138a95084197e66bfd2 (diff)
downloadgdk-pixbuf-daa29b8716663470ca56c21367d78336d569f5c8.tar.gz
Try harder to return pixbufs of the requested size. (#494515, Mike
2008-02-10 Matthias Clasen <mclasne@redhat.com> * gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs of the requested size. (#494515, Mike Morrison) svn path=/trunk/; revision=19504
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-scaled-anim.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-scaled-anim.c b/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
index b9b593dd2..06d1cc087 100644
--- a/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
+++ b/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
@@ -139,8 +139,8 @@ get_scaled_pixbuf (GdkPixbufScaledAnim *scaled,
/* Get a new scaled pixbuf */
scaled->current = gdk_pixbuf_scale_simple (pixbuf,
- (int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale),
- (int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale),
+ (int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale + .5),
+ (int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale + .5),
GDK_INTERP_BILINEAR);
/* Copy the original pixbuf options to the scaled pixbuf */
@@ -170,9 +170,9 @@ get_size (GdkPixbufAnimation *anim,
GDK_PIXBUF_ANIMATION_GET_CLASS (scaled->anim)->get_size (scaled->anim, width, height);
if (width)
- *width = (int)(*width * scaled->xscale);
+ *width = (int)(*width * scaled->xscale + .5);
if (height)
- *height = (int)(*height * scaled->yscale);
+ *height = (int)(*height * scaled->yscale + .5);
}
static GdkPixbufAnimationIter *