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

version» Context lines:

pike.git/src/modules/Image/layers.c:1047:   **!   **! note:   **! image and alpha channel must be of the same size,   **! or canceled.   */      static void image_layer_set_mode(INT32 args)   {    int i;    if (args!=1) -  SIMPLE_TOO_FEW_ARGS_ERROR("set_mode",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("set_mode",1);    if (TYPEOF(Pike_sp[-args]) != T_STRING)    SIMPLE_ARG_TYPE_ERROR("set_mode",1,"string");       for (i=0; i<LAYER_MODES; i++)    if (Pike_sp[-args].u.string==layer_mode[i].ps)    {    THIS->row_func=layer_mode[i].func;    THIS->optimize_alpha=layer_mode[i].optimize_alpha;    THIS->really_optimize_alpha=really_optimize_p(THIS);   
pike.git/src/modules/Image/layers.c:1120:   **! method object fill()   **! method object fill_alpha()   **! Set/query fill color and alpha, ie the color used "outside" the   **! image. This is mostly useful if you want to "frame"   **! a layer.   */      static void image_layer_set_fill(INT32 args)   {    if (!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("set_fill",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("set_fill",1);       if (TYPEOF(Pike_sp[-args]) == T_INT && !Pike_sp[-args].u.integer)    THIS->fill=black;    else    if (!image_color_arg(-args,&(THIS->fill)))    SIMPLE_ARG_TYPE_ERROR("set_fill",1,"Image.Color");       smear_color(THIS->sfill,THIS->fill,SNUMPIXS);       THIS->fill_alpha=white;
pike.git/src/modules/Image/layers.c:1411:   **! "fill_alpha":image   **! "tiled":int,   **! "mode":string   **! ])    */   static void image_layer_cast(INT32 args)   {    struct pike_string *type;       if (!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("cast",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("cast",1);       type = Pike_sp[-args].u.string;    pop_n_elems(args); /* type have at least one more reference. */       if (type == literal_mapping_string)    {    int n=0;       push_static_text("xsize"); push_int(THIS->xsize); n++;    push_static_text("ysize"); push_int(THIS->ysize); n++;
pike.git/src/modules/Image/layers.c:2882:   {    int layers,i,j;    struct layer **l;    struct object *o;    struct layer *dest;    struct array *a;    INT_TYPE xoffset=0,yoffset=0,xsize=0,ysize=0;    ONERROR err;       if (!args) -  SIMPLE_TOO_FEW_ARGS_ERROR("lay",1); +  SIMPLE_WRONG_NUM_ARGS_ERROR("lay",1);       if (TYPEOF(Pike_sp[-args]) != T_ARRAY)    SIMPLE_ARG_TYPE_ERROR("lay",1,"array(Image.Layer|mapping)");       if (args>1)    {    get_all_args("lay",args-1,"%i%i%i%i",    &xoffset,&yoffset,&xsize,&ysize);    if (xsize<1)    SIMPLE_ARG_TYPE_ERROR("lay",4,"int(1..)");
pike.git/src/modules/Image/layers.c:3225:    dmalloc_touch_svalue(Pike_sp);    push_array_items(Pike_sp->u.array); /* frees */    image_layer_crop(4);   }         static void image_layer__sprintf( INT32 args )   {    int x;    if (args != 2 ) -  SIMPLE_TOO_FEW_ARGS_ERROR("_sprintf",2); +  SIMPLE_WRONG_NUM_ARGS_ERROR("_sprintf",2);    if (TYPEOF(Pike_sp[-args]) != T_INT)    SIMPLE_ARG_TYPE_ERROR("_sprintf",0,"int");    if (TYPEOF(Pike_sp[1-args]) != T_MAPPING)    SIMPLE_ARG_TYPE_ERROR("_sprintf",1,"mapping");       x = Pike_sp[-2].u.integer;       pop_n_elems( 2 );    switch( x )    {