Branch: Tag:

2000-04-13

2000-04-13 17:52:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed thread-bug in img_box_nocheck().

Rev: src/modules/Image/blit.c:1.38

1: - /* $Id: blit.c,v 1.37 1999/06/18 19:19:14 mirar Exp $ */ + /* $Id: blit.c,v 1.38 2000/04/13 17:52:33 grubba Exp $ */   #include "global.h"      /*   **! module Image   **! note - **! $Id: blit.c,v 1.37 1999/06/18 19:19:14 mirar Exp $ + **! $Id: blit.c,v 1.38 2000/04/13 17:52:33 grubba Exp $   **! class Image   */   
155:    end=this->img+x2+y2*this->xsize+1;       THREADS_ALLOW(); +  do {    if(!this->alpha)    {    if(!mod)
162:    else {    int length = x2-x1+1, xs=this->xsize, y=y2-y1+1;    rgb_group *from = foo; -  if(!length) return; +  if(!length) +  break; /* Break to the while(0). */    for(x=0; x<length; x++) *(foo+x) = rgb;    while(--y) MEMCPY((foo+=xs), from, length*sizeof(rgb_group));    }
172:    for (; foo<=end; foo+=mod) for (x=x1; x<=x2; x++,foo++)    set_rgb_group_alpha(*foo,rgb,this->alpha);    } +  } while(0);    THREADS_DISALLOW();   }