Author: matthiasc
Date: Sun Feb 10 06:30:12 2008
New Revision: 19505
URL: http://svn.gnome.org/viewvc/gtk+?rev=19505&view=rev

Log:
2008-02-10  Matthias Clasen  <[EMAIL PROTECTED]>

        * gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
        of the requested size.  (#494515, Mike Morrison)



Modified:
   branches/gtk-2-12/gdk-pixbuf/ChangeLog
   branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-scaled-anim.c

Modified: branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-scaled-anim.c
==============================================================================
--- branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-scaled-anim.c       (original)
+++ branches/gtk-2-12/gdk-pixbuf/gdk-pixbuf-scaled-anim.c       Sun Feb 10 
06:30:12 2008
@@ -139,8 +139,8 @@
 
        /* 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 @@
 
         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 *
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to