pike.git / lib / modules / Graphics.pmod / Graph.pmod / polyline.pike

version» Context lines:

pike.git/lib/modules/Graphics.pmod/Graph.pmod/polyline.pike:1:   /*    * Graph sub-module providing draw functions. -  * $Id: polyline.pike,v 1.4 2001/11/19 00:01:32 nilsson Exp $ +  * $Id: polyline.pike,v 1.5 2003/08/22 14:26:26 nilsson Exp $    */      #pike __REAL_VERSION__      #define CAP_BUTT 0   #define CAP_ROUND 1   #define CAP_PROJECTING 2      #define JOIN_MITER 0   #define JOIN_ROUND 1
pike.git/lib/modules/Graphics.pmod/Graph.pmod/polyline.pike:26:    * /grubba (who got tired of BG beeing so slow)    */      static array(float) init_cap_sin_table()   {    array(float) s_t = allocate(CAPSTEPS);       for (int i = 0; i < CAPSTEPS; i++) {    s_t[i] = sin(PI*i/(CAPSTEPS-1));    } -  return(s_t); +  return s_t;   }      static array(float) cap_sin_table = init_cap_sin_table();      static array(float) init_cap_cos_table()   {    array(float) c_t = allocate(CAPSTEPS);       for (int i = 0; i < CAPSTEPS; i++) {    c_t[i] = cos(PI*i/(CAPSTEPS-1));    } -  return(c_t); +  return c_t;   }      static array(float) cap_cos_table = init_cap_cos_table();            static private array(float) xyreverse(array(float) a)   {    array(float) r = reverse(a);    int n = sizeof(r)/2;