pike.git / src / modules / Image / layers.c

version» Context lines:

pike.git/src/modules/Image/layers.c: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   **!      **!   **!   **! <add_appendix name="layers" title="Image.Layer modes">   **! <dl compact>   **! <dt><i>The variables in the expression:</i>   **! <dt>L<dd><i>The active layer</i>
pike.git/src/modules/Image/layers.c:209:   **! }   **!   **! </execute>   **! </add_appendix>   */      #include "global.h"      #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"      #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "array.h"
pike.git/src/modules/Image/layers.c:2653:    da,len,ly->alpha_value);    }   }      static INLINE void img_lay_line(struct layer *ly,    rgb_group *s,rgb_group *sa,    int xoffs,int xsize,    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;    rgb_group *l,*la;       if (y<0 ||    y>=ly->ysize ||    ly->xoffs+ly->xsize<xoffs ||    ly->xoffs>xoffs+xsize) /* outside */    {
pike.git/src/modules/Image/layers.c:2716:       if (ly->img) l=ly->img->img+y*ly->xsize; else l=NULL;    if (ly->alp) la=ly->alp->img+y*ly->xsize; else la=NULL;       xoffs-=ly->xoffs; /* position in source */    if ((xoffs=xoffs%ly->xsize))    {    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);    da+=len;    d+=len;    sa+=len;    s+=len;    xsize-=len;    }    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;    sa+=ly->xsize;    s+=ly->xsize;    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,    int layers,    struct layer *dest)   {   #ifdef LAYERS_DUAL    rgb_group *line1,*aline1;    rgb_group *line2,*aline2;   #endif