diff --git a/modules/engines/pixbuf/ChangeLog b/modules/engines/pixbuf/ChangeLog index d73045b61d..50f5db6f95 100644 --- a/modules/engines/pixbuf/ChangeLog +++ b/modules/engines/pixbuf/ChangeLog @@ -1,3 +1,11 @@ +Mon Mar 6 11:02:07 2000 Owen Taylor + + * pixmap_theme_pixbuf.c: Handle drawing transparency without a + mask correctly. + + * pixmap_theme_main.c pixmap_theme_draw.c: Remove duplicate + includes. + Sun Feb 6 21:34:30 2000 Owen Taylor * Started ChangeLog for pixbuf engine, check sources diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c index a540700cbe..9a569256ed 100644 --- a/modules/engines/pixbuf/pixbuf-draw.c +++ b/modules/engines/pixbuf/pixbuf-draw.c @@ -1,5 +1,5 @@ /* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat Software + * Copyright (C) 1998-2000 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -22,7 +22,6 @@ #include "pixmap_theme.h" #include -#include "pixmap_theme.h" static ThemeImage * match_theme_image(GtkStyle *style, @@ -78,10 +77,10 @@ match_theme_image(GtkStyle *style, } static void -draw_simple_image(GtkStyle *style, - GdkWindow *window, - GdkRectangle *area, - GtkWidget *widget, +draw_simple_image(GtkStyle *style, + GdkWindow *window, + GdkRectangle *area, + GtkWidget *widget, ThemeMatchData *match_data, gboolean draw_center, gboolean allow_setbg, diff --git a/modules/engines/pixbuf/pixbuf-main.c b/modules/engines/pixbuf/pixbuf-main.c index 1d47a4bbd0..477f8b112c 100644 --- a/modules/engines/pixbuf/pixbuf-main.c +++ b/modules/engines/pixbuf/pixbuf-main.c @@ -1,5 +1,5 @@ /* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat Software + * Copyright (C) 1998-2000 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,7 +20,6 @@ * Carsten Haitzler */ -#include "pixmap_theme.h" #include "pixmap_theme.h" #include diff --git a/modules/engines/pixbuf/pixbuf-render.c b/modules/engines/pixbuf/pixbuf-render.c index 43fa5f4a16..fe80a3250e 100644 --- a/modules/engines/pixbuf/pixbuf-render.c +++ b/modules/engines/pixbuf/pixbuf-render.c @@ -1,5 +1,5 @@ /* GTK+ Pixbuf Engine - * Copyright (C) 1998-2000 Red Hat Software + * Copyright (C) 1998-2000 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -42,7 +42,6 @@ pixbuf_render (GdkPixbuf *src, GdkPixbuf *tmp_pixbuf; GdkRectangle rect; int x_offset, y_offset; - art_u32 bg_color = 0xffffff; if (dest_width <= 0 || dest_height <= 0) return; @@ -84,20 +83,10 @@ pixbuf_render (GdkPixbuf *src, partial_src_gdk = gdk_pixbuf_new_from_art_pixbuf (partial_src_art); tmp_pixbuf = gdk_pixbuf_new (ART_PIX_RGB, src->art_pixbuf->has_alpha, 8, rect.width, rect.height); - if (mask) - { - gdk_pixbuf_scale (partial_src_gdk, tmp_pixbuf, 0, 0, rect.width, rect.height, - dest_x - rect.x, dest_y - rect.y, - (double)dest_width / src_width, (double)dest_height / src_height, - ART_FILTER_BILINEAR); - } - else - { - gdk_pixbuf_composite_color (partial_src_gdk, tmp_pixbuf, 0, 0, rect.width, rect.height, - dest_x - rect.x, dest_y - rect.y, - (double)dest_width / src_width, (double)dest_height / src_height, - ART_FILTER_BILINEAR, 255, 0, 0, 16, bg_color, bg_color); - } + gdk_pixbuf_scale (partial_src_gdk, tmp_pixbuf, 0, 0, rect.width, rect.height, + dest_x - rect.x, dest_y - rect.y, + (double)dest_width / src_width, (double)dest_height / src_height, + ART_FILTER_BILINEAR); gdk_pixbuf_unref (partial_src_gdk); diff --git a/modules/engines/pixbuf/pixbuf.h b/modules/engines/pixbuf/pixbuf.h index a72f384b06..b6e92030f4 100644 --- a/modules/engines/pixbuf/pixbuf.h +++ b/modules/engines/pixbuf/pixbuf.h @@ -1,3 +1,25 @@ +/* GTK+ Pixbuf Engine + * Copyright (C) 1998-2000 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + * Written by Owen Taylor , based on code by + * Carsten Haitzler + */ + #include #include