Branch: Tag:

2000-02-22

2000-02-22 03:41:27 by Per Hedbor <ph@opera.com>

Bugfix for alpha_value in normal mode

Rev: src/modules/Image/layers.c:1.43

1:   /*   **! module Image   **! note - **! $Id: layers.c,v 1.42 2000/02/08 03:38:56 per Exp $ + **! $Id: layers.c,v 1.43 2000/02/22 03:41:27 per Exp $   **! class Layer   **! see also: layers   **!
215:      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.42 2000/02/08 03:38:56 per Exp $"); + RCSID("$Id: layers.c,v 1.43 2000/02/22 03:41:27 per Exp $");      #include "image_machine.h"   
511:    (((COLORMAX*(int)(aL))+(COLORMAX-(int)(aL))*(aS))) ) )      #define COMBINE_ALPHA_V(S,L,aS,aL,V) \ -  COMBINE_ALPHA(S,(int)((L)*(V)),aS,aL) +  COMBINE_ALPHA((S),(L),(aS),((aL)*(V)))      #else   #ifdef COMBINE_METHOD_FLOAT
1323:    {    if (la->r==0 && la->g==0 && la->b==0)    { - #if 0 -  int n=0; -  do -  { -  n++; la++; -  } -  while (len && len-- && la->r==0 && la->g==0 && la->b==0); -  if (n>1) -  { -  MEMCPY(d,s,n*sizeof(rgb_group)); -  MEMCPY(da,sa,n*sizeof(rgb_group)); -  l+=n; s+=n; sa+=n; d+=n; da+=n; -  } -  else -  *(d++)=*(s++),*(da++)=*(sa++),l++; -  continue; - #else +     *d=*s;    *da=*sa; - #endif +     }    else if (la->r==COLORMAX && la->g==COLORMAX && la->b==COLORMAX)    {
1374:    ALPHA_ADD_V_NOLA(s,l,d,sa,da,alpha,g);    ALPHA_ADD_V_NOLA(s,l,d,sa,da,alpha,b);    -  l++; s++; la++; sa++; da++; d++; +  l++; s++; sa++; da++; d++;    }    else    while (len--)