If we're only scaling horizontally or vertically, use GDK_INTERP_NEAREST.

2002-02-08  Anders Carlsson  <andersca@gnu.org>

	* src/theme.c (scale_and_alpha_pixbuf): If we're only
	scaling horizontally or vertically, use GDK_INTERP_NEAREST.
This commit is contained in:
Anders Carlsson 2002-02-08 19:12:55 +00:00 committed by Anders Carlsson
parent ed2e19e4d7
commit 9d84a23cd1
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-02-08 Anders Carlsson <andersca@gnu.org>
* src/theme.c (scale_and_alpha_pixbuf): If we're only
scaling horizontally or vertically, use GDK_INTERP_NEAREST.
2002-02-08 Havoc Pennington <hp@pobox.com> 2002-02-08 Havoc Pennington <hp@pobox.com>
* autogen.sh: unbreak * autogen.sh: unbreak

View File

@ -2555,9 +2555,19 @@ scale_and_alpha_pixbuf (GdkPixbuf *src,
} }
else else
{ {
pixbuf = gdk_pixbuf_scale_simple (pixbuf, if (gdk_pixbuf_get_width (pixbuf) == width ||
width, height, gdk_pixbuf_get_height (pixbuf) == height)
GDK_INTERP_BILINEAR); {
pixbuf = gdk_pixbuf_scale_simple (pixbuf,
width, height,
GDK_INTERP_NEAREST);
}
else
{
pixbuf = gdk_pixbuf_scale_simple (pixbuf,
width, height,
GDK_INTERP_BILINEAR);
}
} }
if (pixbuf) if (pixbuf)