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

version» Context lines:

pike.git/src/modules/Image/layers.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: layers.c,v 1.92 2003/11/14 10:26:43 mast Exp $ + || $Id: layers.c,v 1.93 2003/12/09 08:11:31 nilsson Exp $   */      /*   **! module Image   **! class Layer   **! see also: layers   */      #include "global.h"      #include <math.h> /* floor */    - RCSID("$Id: layers.c,v 1.92 2003/11/14 10:26:43 mast Exp $"); + RCSID("$Id: layers.c,v 1.93 2003/12/09 08:11:31 nilsson 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:1441:   {    if (!args)    SIMPLE_TOO_FEW_ARGS_ERROR("Image.Layer->cast",1);    if (Pike_sp[-args].type==T_STRING||Pike_sp[-args].u.string->size_shift)    {    if (strncmp(Pike_sp[-args].u.string->str,"mapping",7)==0)    {    int n=0;    pop_n_elems(args);    -  push_text("xsize"); push_int(THIS->xsize); n++; -  push_text("ysize"); push_int(THIS->ysize); n++; -  push_text("image"); image_layer_image(0); n++; -  push_text("alpha"); image_layer_alpha(0); n++; -  push_text("xoffset"); push_int(THIS->xoffs); n++; -  push_text("yoffset"); push_int(THIS->yoffs); n++; -  push_text("alpha_value"); push_float(THIS->alpha_value); n++; -  push_text("fill"); image_layer_fill(0); n++; -  push_text("fill_alpha"); image_layer_fill_alpha(0); n++; -  push_text("tiled"); push_int(THIS->tiled); n++; -  push_text("mode"); image_layer_mode(0); n++; +  push_constant_text("xsize"); push_int(THIS->xsize); n++; +  push_constant_text("ysize"); push_int(THIS->ysize); n++; +  push_constant_text("image"); image_layer_image(0); n++; +  push_constant_text("alpha"); image_layer_alpha(0); n++; +  push_constant_text("xoffset"); push_int(THIS->xoffs); n++; +  push_constant_text("yoffset"); push_int(THIS->yoffs); n++; +  push_constant_text("alpha_value"); push_float(THIS->alpha_value); n++; +  push_constant_text("fill"); image_layer_fill(0); n++; +  push_constant_text("fill_alpha"); image_layer_fill_alpha(0); n++; +  push_constant_text("tiled"); push_int(THIS->tiled); n++; +  push_constant_text("mode"); image_layer_mode(0); n++;       f_aggregate_mapping(n*2);       return;    }    }    SIMPLE_BAD_ARG_ERROR("Image.Colortable->cast",1,    "string(\"mapping\"|\"array\"|\"string\")");      }