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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - string cvs_version="$Id: graphic_text.pike,v 1.45 1997/06/12 02:41:46 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.46 1997/06/23 03:28:19 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image   # define Font font
Roxen.git/server/modules/graphics/graphic_text.pike:80:    " texture=file Use the specified file as text texture\n"    " 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 scrolltext\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:636:   // Quantify    if(!args->fs)    {   #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->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(); +  sscanf(args->scroll, "%d,%d,%d", len, steps, delay); +  img=img->copy(0,0,(ox=img->xsize())+len-1,img->ysize()-1); +  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];   }         mapping find_file(string f, object rid)   {    int id;    sscanf(f,"%d/%s", id, f);