In a couple of places an "=" got in where it should be "==", here is the
revised
version of the patch to the file "evas_blend_alpha_color_pixel.c".

                                jose.

-------------------------------------------------------------------------
----------------

Index:
cvs/e17/libs/evas/src/lib/engines/common/evas_blend_alpha_color_pixel.c
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_blend_al
pha_color_pixel.c,v
retrieving revision 1.3
diff -u -r1.3 evas_blend_alpha_color_pixel.c
---
cvs/e17/libs/evas/src/lib/engines/common/evas_blend_alpha_color_pixel.c 1
2 May 2003 02:26:26 -0000       1.3
+++
cvs/e17/libs/evas/src/lib/engines/common/evas_blend_alpha_color_pixel.c 1
7 Mar 2004 18:51:22 -0000
@@ -18,12 +18,43 @@
    dst_ptr = dst;
    dst_end_ptr = dst + len;
 
+   if (A_VAL(&col) < 0xff)
+     {
+       while (dst_ptr < dst_end_ptr)
+         {
+           DATA32 tmp;
+           DATA8 aa;
+       
+           MULT_COLOR(aa, *src_ptr, A_VAL(&col), tmp);
+          if (!aa) { src_ptr++;  dst_ptr++;  continue; }
+           BLEND_COLOR(aa, R_VAL(dst_ptr), 
+                       R_VAL(&col), R_VAL(dst_ptr), 
+                       tmp);
+           BLEND_COLOR(aa, G_VAL(dst_ptr), 
+                       G_VAL(&col), G_VAL(dst_ptr), 
+                       tmp);
+           BLEND_COLOR(aa, B_VAL(dst_ptr), 
+                       B_VAL(&col), B_VAL(dst_ptr), 
+                       tmp);
+
+           src_ptr++;
+           dst_ptr++;
+         }
+       return;
+     }
+
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
        DATA8 aa;
        
-       aa = (((*src_ptr) +1) * A_VAL(&col)) >> 8;
+       aa = *src_ptr;
+      if (!aa) { src_ptr++;  dst_ptr++;  continue; }
+      if (aa == 0xff)
+        {
+          *dst_ptr = col;
+          src_ptr++;  dst_ptr++;  continue;
+        }
        BLEND_COLOR(aa, R_VAL(dst_ptr), 
                    R_VAL(&col), R_VAL(dst_ptr), 
                    tmp);
@@ -33,6 +64,7 @@
        BLEND_COLOR(aa, B_VAL(dst_ptr), 
                    B_VAL(&col), B_VAL(dst_ptr), 
                    tmp);
+
        src_ptr++;
        dst_ptr++;
      }
@@ -117,15 +149,53 @@
    dst_ptr = dst;
    dst_end_ptr = dst + len;
 
+   if (A_VAL(&col) < 0xff)
+     {
+       while (dst_ptr < dst_end_ptr)
+         {
+           DATA32 tmp;
+           DATA8  a;
+           DATA8 aa;
+       
+           MULT_COLOR(aa, *src_ptr, A_VAL(&col), tmp);
+          if (!aa) { src_ptr++;  dst_ptr++;  continue; }
+           a = _evas_pow_lut[aa][A_VAL(dst_ptr)];      
+           BLEND_COLOR(aa, A_VAL(dst_ptr), 
+                       255, A_VAL(dst_ptr), 
+                       tmp);
+           BLEND_COLOR(a, R_VAL(dst_ptr), 
+                       R_VAL(&col), R_VAL(dst_ptr), 
+                       tmp);
+           BLEND_COLOR(a, G_VAL(dst_ptr), 
+                       G_VAL(&col), G_VAL(dst_ptr), 
+                       tmp);
+           BLEND_COLOR(a, B_VAL(dst_ptr), 
+                       B_VAL(&col), B_VAL(dst_ptr), 
+                       tmp);
+
+           src_ptr++;
+           dst_ptr++;
+         }
+       return;
+     }
+
    while (dst_ptr < dst_end_ptr)
      {
        DATA32 tmp;
        DATA8  a;
        DATA8 aa;
        
-       aa = (((*src_ptr) + 1) * A_VAL(&col)) >> 8;
-       a = _evas_pow_lut[aa][A_VAL(dst_ptr)];
-       
+       aa = *src_ptr;
+      if (!aa) { src_ptr++;  dst_ptr++;  continue; }
+      if (aa == 0xff)
+        {
+          *dst_ptr = col;
+          src_ptr++;  dst_ptr++;  continue;
+        }
+       a = _evas_pow_lut[aa][A_VAL(dst_ptr)];  
+       BLEND_COLOR(aa, A_VAL(dst_ptr), 
+                   255, A_VAL(dst_ptr), 
+                   tmp);
        BLEND_COLOR(a, R_VAL(dst_ptr), 
                    R_VAL(&col), R_VAL(dst_ptr), 
                    tmp);
@@ -135,7 +205,7 @@
        BLEND_COLOR(a, B_VAL(dst_ptr), 
                    B_VAL(&col), B_VAL(dst_ptr), 
                    tmp);
-       A_VAL(dst_ptr) = A_VAL(dst_ptr) + ((aa * (255 - A_VAL(dst_ptr))) /
255);
+
        src_ptr++;
        dst_ptr++;
      }





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to