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:
parent
ed2e19e4d7
commit
9d84a23cd1
@ -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>
|
||||
|
||||
* autogen.sh: unbreak
|
||||
|
10
src/theme.c
10
src/theme.c
@ -2553,12 +2553,22 @@ scale_and_alpha_pixbuf (GdkPixbuf *src,
|
||||
{
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gdk_pixbuf_get_width (pixbuf) == width ||
|
||||
gdk_pixbuf_get_height (pixbuf) == height)
|
||||
{
|
||||
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)
|
||||
pixbuf = multiply_alpha (pixbuf,
|
||||
|
Loading…
Reference in New Issue
Block a user