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.29 1999/07/23 21:37:38 mirar Exp $ + **! $Id: layers.c,v 1.30 1999/07/26 11:27:23 mirar Exp $   **! class Layer   **! see also: layers   **!      **!   **!   **! <add_appendix name="layers" title="Image.Layer modes"><execute>   **! import Image;   **!   **! void write_image(string desc,
pike.git/src/modules/Image/layers.c:188:   **! }   **!   **! </execute>   **! </add_appendix>   */      #include "global.h"      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.29 1999/07/23 21:37:38 mirar Exp $"); + RCSID("$Id: layers.c,v 1.30 1999/07/26 11:27:23 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:2413:    struct image *img;       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++;    -  fprintf(stderr,"old %d,%d + %d,%d\n",l->xoffs,l->yoffs,l->xsize,l->ysize); -  fprintf(stderr,"new %d,%d + %d,%d zot=%d\n",x,y,xz,yz,zot); +     xi=x-l->xoffs;    yi=y-l->yoffs;    l->xoffs=x;    l->yoffs=y; -  fprintf(stderr,"crop %d,%d + %d,%d zot=%d\n",xi,yi,xz,yz,zot); +        if (zot && l->image)    {    ref_push_object(l->image);    push_constant_text("copy");    f_index(2);    push_int(xi);    push_int(yi);    push_int(xz+xi-1);    push_int(yz+yi-1);