]> Pileus Git - ~andy/gtk/commitdiff
Handle drawing transparency without a mask correctly.
authorOwen Taylor <otaylor@redhat.com>
Mon, 6 Mar 2000 16:12:22 +0000 (16:12 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 6 Mar 2000 16:12:22 +0000 (16:12 +0000)
Mon Mar  6 11:02:07 2000  Owen Taylor  <otaylor@redhat.com>

* pixmap_theme_pixbuf.c: Handle drawing transparency without a
mask correctly.

* pixmap_theme_main.c pixmap_theme_draw.c: Remove duplicate
includes.

modules/engines/pixbuf/ChangeLog
modules/engines/pixbuf/pixbuf-draw.c
modules/engines/pixbuf/pixbuf-main.c
modules/engines/pixbuf/pixbuf-render.c
modules/engines/pixbuf/pixbuf.h

index d73045b61dd2047e6a23b00f44e466e99474087b..50f5db6f9586106099dbed3effdd217cfe22eda0 100644 (file)
@@ -1,3 +1,11 @@
+Mon Mar  6 11:02:07 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * Started ChangeLog for pixbuf engine, check sources
index a540700cbe68764b26707e087f686fdcc307aef7..9a569256ed8d52cb1983a658d7c6d60fb6600495 100644 (file)
@@ -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 <math.h>
-#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,
index 1d47a4bbd044dac34a30a9a362b48bbcd18ca102..477f8b112c562b8990ef96107ee0e2b684171130 100644 (file)
@@ -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 <raster@rasterman.com>
  */
 
-#include "pixmap_theme.h"
 #include "pixmap_theme.h"
 #include <gmodule.h>
 
index 43fa5f4a162a2258c53d0977232bee3097908f2b..fe80a3250e74d9ce2a7a8cded168fadee3738bed 100644 (file)
@@ -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);
       
index a72f384b06bf0889027260cfe39e8ff742c01b3c..b6e92030f45885f19bc2c603cbac36ee93b8d03f 100644 (file)
@@ -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 <otaylor@redhat.com>, based on code by
+ * Carsten Haitzler <raster@rasterman.com>
+ */
+
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>