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.19 1996/12/10 04:52:30 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.20 1996/12/10 05:39:32 per Exp $";   #include <module.h>   inherit "module";   inherit "roxenlib";         array register_module()   {    return ({ MODULE_LOCATION | MODULE_PARSER,    "Graphics text",    "Makes a few new tags, which render text to gifs "
Roxen.git/server/modules/graphics/graphic_text.pike:308:    case "center":    xoffset = (xsize/2 - txsize/2);    break;    case "right":    xoffset = (xsize - txsize);    break;    case "left":    }    } else    background = Image(xsize, ysize, @bgcolor); +     background->setcolor(@bgcolor); -  +     if(args->size || args->xsize || args->ysize)    {    int xs=background->xsize(), ys=background->ysize();    if(args->size) { xs=(int)args->size; ys=(int)(args->size/",")[-1]; }    if(args->xsize) xs=(int)args->xsize;    if(args->ysize) ys=(int)args->ysize; -  background = background->copy(0,0,xsize,ysize); +  background = background->copy(0,0,xs,ys);    }          if(args->turbulence)    {    array (float|array(int)) arg=({});    foreach((args->turbulence/";"), string s)    {    array q= s/",";    if(sizeof(q)<2) args+=({ ((float)s)||0.2, ({ 255,255,255 }) });
Roxen.git/server/modules/graphics/graphic_text.pike:411:    // Check the cache first..    if(mixed data = cache_lookup("gtext:"+(_args-_start), text))    {    if(size) return data[1];    return data[0];    }    // Nothing found in the cache. Generate a new image.          -  string key = args->font+args->justift+":"+args->xpad+":"+args->ypad; +  string key = args->font+"/"+args->talign+"/"+args->xpad+"/"+args->ypad;    data = cache_lookup("fonts", key);    if(!data)    {    data = load_font(args->font, lower_case(args->talign||"left"),(int)args->xpad,(int)args->ypad);    cache_set("fonts", key, data);    }       // Fonts and such are now initialized.       img = make_text_image(args,data,text);