Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.71 1997/09/12 06:14:32 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.72 1997/09/12 21:17:50 js Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image
Roxen.git/server/modules/graphics/graphic_text.pike:84:    " turbulence=args args is: frequency,color;freq,col;freq,col\n"    " Apply a turbulence filter, and use this as the\n"    " background.\n"    " maxlen=arg The maximum length of the rendered text will be\n"    " the specified argument. The default is 300, this\n"    " is used to safeguard against mistakes like\n"    " &lt;gh1&gt;&lt;/gh&gt;, which would otherwise\n"    " parse the whole document.\n"    " help Display this text\n"    " scroll=width,steps,delay Make a horrible scrolltext\n" +  " fadein=blur,steps,delay,initialdelay Make a (somewhat less) horrible fadein\n"    "\n"    "<b>Arguments passed on the the &lt;a&gt; tag (if href is specified):</b>\n "    " target=...\n"    " onClick=...\n"    "</pre>\n",    0,    1,    });   }   
Roxen.git/server/modules/graphics/graphic_text.pike:354:    xsize+=((int)(args->shadow/",")[-1])+2;    ysize+=((int)(args->shadow/",")[-1])+2;    }       if(args->bshadow)    {    xsize+=(int)args->bshadow+3;    ysize+=(int)args->bshadow+3;    }    +  if(args->fadein) +  { +  xsize+=6; +  ysize+=6; +  xoffset+=3; +  yoffset+=3; +  } +     if(args->move)    {    int dx,dy;    sscanf(args->move, "%d,%d", dx, dy);    xoffset += dx;    yoffset += dy;    }       if(args->ghost)    {
Roxen.git/server/modules/graphics/graphic_text.pike:729: Inside #if defined(QUANT_DEBUG)
   {   #ifdef QUANT_DEBUG    print_colors(img->select_colors(q-1)+({parse_color(args->bg)}));   #endif    img = img->map_closest(img->select_colors(q-1)+({parse_color(args->bg)}));    }      // place in cache, as a gif image.       if(!args->scroll) +  if(args->fadein)    { -  +  int amount=2, steps=10, delay=10, initialdelay=0, ox; +  string res = img->gif_begin(); +  sscanf(args->fadein, "%d,%d,%d,%d", amount, steps, delay, initialdelay); +  if(initialdelay) +  { +  object foo=image(img->xsize(),img->ysize(),0,0,0); +  res += foo->gif_add(0,0,initialdelay); +  } +  for(int i = 0; i<steps; i++) +  { +  object foo=img->clone(); +  foo = foo->apply_matrix(make_matrix(( (int)((steps-i)*amount)))); +  werror((string)i); +  res += foo->gif_add(0,0,delay); +  } +  res+= img->gif_add(0,0,delay); +  res += img->gif_end(); +  data = ({ res, ({ img->xsize(), img->ysize() }) }); +  } +  else +  {    if(args->fs)    data=({ img->togif_fs(@(args->notrans?({}):parse_color(args->bg))),    ({img->xsize(),img->ysize()})});    else    data=({ img->togif(@(args->notrans?({}):parse_color(args->bg))),    ({img->xsize(),img->ysize()})});    img=0;    } else {    int len=100, steps=30, delay=5, ox;    string res = img->gif_begin() + img->gif_netscape_loop();
Roxen.git/server/modules/graphics/graphic_text.pike:752:    img->paste(img, ox, 0);    for(int i = 0; i<steps; i++)    {    int xp = i*ox/steps;    res += img->copy(xp, 0, xp+len, img->ysize(),    @parse_color(args->bg))->gif_add(0,0,delay);    }    res += img->gif_end();    data = ({ res, ({ len, img->ysize() }) });    } +  +     cache_set(key, text, data);    if(size) return data[1];    return data[0];    };    cache_set(key, text, 0);    throw(err);   }         mapping find_file(string f, object rid)