[PATCH]gdk_pixbuf_composite in GDK_INTERP_NEAREST mode



Hello,

In GDK_INTERP_NEAREST mode, gdk_pixbuf_composte function 
does't work correctly. In pixops_composite_nearest function,
during processing toward  x axis, 'src' pointer is fixed. 
So It use 'p' pointer, alternately. 

GTK 2.0's gdk-pixbuf has this problem, too.


thanks in advance,
---
OKADA Mitsuru


Index: pixops.c
===================================================================
RCS file: /cvs/gnome/gdk-pixbuf/gdk-pixbuf/pixops/pixops.c,v
retrieving revision 1.14
diff -u -r1.14 pixops.c
--- pixops.c    2000/09/10 02:32:18     1.14
+++ pixops.c    2000/12/08 04:57:07
@@ -183,9 +183,9 @@
 
              if (w != 0)
                {
-                 dest[0] = (w0 * src[0] + w1 * dest[0]) / w;
-                 dest[1] = (w0 * src[1] + w1 * dest[1]) / w;
-                 dest[2] = (w0 * src[2] + w1 * dest[2]) / w;
+                 dest[0] = (w0 * p[0] + w1 * dest[0]) / w;
+                 dest[1] = (w0 * p[1] + w1 * dest[1]) / w;
+                 dest[2] = (w0 * p[2] + w1 * dest[2]) / w;
                  dest[3] = w / 0xff;
                }
              else




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]