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.54 2000/08/12 23:06:54 grubba Exp $ + **! $Id: layers.c,v 1.55 2000/08/15 12:44:50 grubba 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:208:   **! }   **!   **! </execute>   **! </add_appendix>   */      #include "global.h"      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.54 2000/08/12 23:06:54 grubba Exp $"); + RCSID("$Id: layers.c,v 1.55 2000/08/15 12:44:50 grubba 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:2728:   **! note:   **! The new layer object may have the same image object,   **! if there was no cropping to be done.   */      static void image_layer_crop(INT32 args)   {    struct layer *l;    INT_TYPE x,y,xz,yz,xi,yi;    int zot=0; -  struct image *img; +  struct image *img = NULL;       get_all_args("Image.Layer->crop",args,"%d%d%d%d",&x,&y,&xz,&yz);       l=clone_this_layer();    if (x<=l->xoffs) x=l->xoffs; else zot++;    if (y<=l->yoffs) y=l->yoffs; else zot++;    if (l->xsize+l->xoffs<=x+xz) xz=l->xsize-(x-l->xoffs); else zot++;    if (l->ysize+l->yoffs<=y+yz) yz=l->ysize-(y-l->yoffs); else zot++;       xi=x-l->xoffs;