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

version» Context lines:

pike.git/src/modules/Image/layers.c:830:   **! method object set_alpha_value(float value)   **! method float alpha_value()   **! Set/get the general alpha value of this layer.   **! This is a float value between 0 and 1,   **! and is multiplied with the alpha channel.   */      static void image_layer_set_alpha_value(INT32 args)   {    FLOAT_TYPE f; -  get_all_args("set_alpha_value",args,"%F",&f); +  get_all_args(NULL,args,"%F",&f);    if (f<0.0 || f>1.0)    SIMPLE_ARG_TYPE_ERROR("set_alpha_value",1,"float(0..1)");    THIS->alpha_value=f;    pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void image_layer_alpha_value(INT32 args)   {    pop_n_elems(args);
pike.git/src/modules/Image/layers.c:1185:   **! Set/query layer offset.   **!   **! method int xsize()   **! method int ysize()   **! Query layer offset. This is the same as layer   **! image/alpha image size.   */      static void image_layer_set_offset(INT32 args)   { -  get_all_args("set_offset",args,"%d%d", /* INT32! */ +  get_all_args(NULL,args,"%d%d", /* INT32! */    &(THIS->xoffs),&(THIS->yoffs));    pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void image_layer_xoffset(INT32 args)   {    pop_n_elems(args);    push_int(THIS->xoffs);   }
pike.git/src/modules/Image/layers.c:1226:   **! method object set_tiled(int yes)   **! method int tiled()   **! Set/query <i>tiled</i> flag. If set, the   **! image and alpha channel will be tiled rather   **! then framed by the <ref>fill</ref> values.   */      static void image_layer_set_tiled(INT32 args)   {    INT_TYPE tiled; -  get_all_args("set_tiled",args,"%i",&tiled); +  get_all_args(NULL,args,"%i",&tiled);    THIS->tiled=!!tiled;    THIS->really_optimize_alpha=really_optimize_p(THIS);    pop_n_elems(args);    ref_push_object(THISOBJ);   }      static void image_layer_tiled(INT32 args)   {    pop_n_elems(args);    push_int(THIS->tiled);
pike.git/src/modules/Image/layers.c:1347:    try_parameter_pair("xoffset","yoffset",image_layer_set_offset);    try_parameter_pair("fill","fill_alpha",image_layer_set_fill);    try_parameter("tiled",image_layer_set_tiled);    pop_stack();    }    else if (TYPEOF(Pike_sp[-args]) == T_INT && args>1    && TYPEOF(Pike_sp[1-args]) == T_INT)    {    rgb_group col=black,alpha=white;    -  get_all_args("create",args,"%d%d", /* watch the type: INT32 */ +  get_all_args(NULL,args,"%d%d", /* watch the type: INT32 */    &(THIS->xsize),&(THIS->ysize));    if (args>2)    if (!image_color_arg(2-args,&col))    SIMPLE_ARG_TYPE_ERROR("create",3,"Image.Color");       if (args>3)    if (!image_color_arg(3-args,&alpha))    SIMPLE_ARG_TYPE_ERROR("create",4,"Image.Color");    pop_n_elems(args);   
pike.git/src/modules/Image/layers.c:2867:    ONERROR err;       if (!args)    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", +  get_all_args(NULL,args-1,"%i%i%i%i",    &xoffset,&yoffset,&xsize,&ysize);    if (xsize<1)    SIMPLE_ARG_TYPE_ERROR("lay",4,"int(1..)");    if (ysize<1)    SIMPLE_ARG_TYPE_ERROR("lay",5,"int(1..)");    }       layers=(a=Pike_sp[-args].u.array)->size;       if (!layers) /* dummy return empty layer */
pike.git/src/modules/Image/layers.c:3044:   **! 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 = NULL;    -  get_all_args("crop",args,"%i%i%i%i",&x,&y,&xz,&yz); +  get_all_args(NULL,args,"%i%i%i%i",&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;    yi=y-l->yoffs;    l->xoffs=x;
pike.git/src/modules/Image/layers.c:3152:   **!   **! see also: crop, Image.Image->autocrop   */      static void image_layer_find_autocrop(INT32 args)   {    INT32 x1=0,y1=0,x2=THIS->xsize-1,y2=THIS->ysize-1;    INT_TYPE l=1,r=1,t=1,b=1;       if (args>3) -  get_all_args("find_autocrop",args,"%i%i%i%i",&l,&r,&t,&b); +  get_all_args(NULL,args,"%i%i%i%i",&l,&r,&t,&b);       if (!THIS->tiled) {    if (THIS->alpha)    {    img_find_autocrop(THIS->alp, &x1,&y1,&x2,&y2,    0,l,r,t,b,1,THIS->fill_alpha);    if (THIS->image &&    (THIS->fill_alpha.r!=0 ||    THIS->fill_alpha.g!=0 || /* non-transparent fill */    THIS->fill_alpha.b!=0)) /* check image too */