pike.git / src / modules / Image / phase.h

version» Context lines:

pike.git/src/modules/Image/phase.h:13:   {    struct object *o;    struct image *img,    *this;    rgb_group *imgi=0,*thisi=0;       int y, x; /* for this & img */    int yz, xz; /* for this & img */    int ys, xs; /* for this & img */    -  if (!THIS->img) { Pike_error("no image\n"); return; } +  CHECK_INIT();    this=THIS;    thisi=this->img;          push_int(this->xsize);    push_int(this->ysize);    o=clone_object(image_program,2); -  img=(struct image*)get_storage(o,image_program); +  img=get_storage(o,image_program);    imgi=img->img;       pop_n_elems(args);      THREADS_ALLOW();    xz=this->xsize;    yz=this->ysize;       xs=this->xsize-1;    ys=this->ysize-1;
pike.git/src/modules/Image/phase.h:59:    imgi[i].R=0;\    }\    else \    {\    if (V==0) imgi[i].R=32;\    else if (H==0) imgi[i].R=256-32;\    else\    {\    if (abs(V)>abs(H))\    if (V<0)\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+224+(((float)H)/\ -  (0-V))*32.0);\ +  imgi[i].R=(COLORTYPE)(0.5+224+(((float)H)/(0-V))*32.0);\    else\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+96+(((float)H)/\ -  (V))*32.0);\ +  imgi[i].R=(COLORTYPE)(0.5+96+(((float)H)/(V))*32.0);\    else\    if (H<0)\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+32+(((float)V)/\ -  (0-H))*32.0);\ +  imgi[i].R=(COLORTYPE)(0.5+32+(((float)V)/(0-H))*32.0);\    else\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+160+(((float)V)/\ -  (H))*32.0);\ +  imgi[i].R=(COLORTYPE)(0.5+160+(((float)V)/(H))*32.0);\    }\    }\    }       DALOOP(r)    DALOOP(g)    DALOOP(b)      #undef DALOOP      THREADS_DISALLOW();       push_object(o);   }