Branch: Tag:

2001-06-03

2001-06-03 09:07:46 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

bugfix in tiled layer handling

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

1:   /*   **! module Image   **! note - **! $Id: layers.c,v 1.68 2001/04/10 19:22:34 mirar Exp $ + **! $Id: layers.c,v 1.69 2001/06/03 09:07:46 mirar Exp $   **! class Layer   **! see also: layers   **!
216:      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.68 2001/04/10 19:22:34 mirar Exp $"); + RCSID("$Id: layers.c,v 1.69 2001/06/03 09:07:46 mirar Exp $");      #include "image_machine.h"   
2660:    int y, /* y in ly layer */    rgb_group *d,rgb_group *da)   { + /* fprintf(stderr,"tiled:%d xoffs:%d xsize:%d y:%d\n", */ + /* ly->tiled,xoffs,xsize,y); */ +     if (!ly->tiled)    {    int len;
2723:    int len;    if (xoffs<0) xoffs+=ly->xsize;    len=ly->xsize-xoffs; +  if (len>xsize) len=xsize;    -  + /* fprintf(stderr,"a xoffs=%d len=%d xsize=%d ly->xsize:%d\n",xoffs,len,xsize,ly->xsize); */ +     img_lay_stroke(ly,l?l+xoffs:NULL,    la?la+(xoffs%ly->xsize):NULL,    s,sa,d,da,len);
2735:    }    while (xsize>ly->xsize)    { + /* fprintf(stderr,"b xsize=%d\n",xsize); */ +     img_lay_stroke(ly,l,la,s,sa,d,da,ly->xsize);    da+=ly->xsize;    d+=ly->xsize;
2743:    xsize-=ly->xsize;    }    if (xsize) +  { + /* fprintf(stderr,"c xsize=%d\n",xsize); */    img_lay_stroke(ly,l,la,s,sa,d,da,xsize);    }    } -  + }         void img_lay(struct layer **layer,