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.23.2.3 1997/02/22 20:03:58 grubba Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.23.2.4 1997/02/24 20:36:01 grubba 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:503:    {    if(args->nocache) // Remove from cache. Very usable for access counters    cache_remove(key, text);    if(size) return data[1];    return data[0];    }    // Nothing found in the cache. Generate a new image.          -  string fkey = args->font+"/"+args->talign+"/"+args->xpad+"/"+args->ypad; -  data = cache_lookup("fonts", fkey); +  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", fkey, data); +  cache_set("fonts", key, data);    }       // Fonts and such are now initialized.       img = make_text_image(args,data,text);       // Now we have the image in 'img', or nothing.       if(!img) return 0;   
Roxen.git/server/modules/graphics/graphic_text.pike:635:         string magic_image(string url, int xs, int ys, string sn,    string image_1, string image_2, string alt,    string mess,object id,string input,string extra_args)   {    if(!id->supports->images) return alt;    if(!id->supports->javascript)    return (!input)?    ("<a "+extra_args+"href=\""+url+"\"><img _parsed=1 src="+image_1+" name="+ -  sn+" border=0 alt=\""+alt+"\" ></a>\n"): +  sn+" border=0 width="+xs+" height="+ys+" alt=\""+alt+"\"></a>\n"):    ("<input type=image "+extra_args+" src="+image_1+" name="+input+">");       return    ("<script>\n"    "<!-- \n"    "if(version == \"3\")\n"    "{\n"    " "+sn+" = new Image("+xs+", "+ys+");\n"    " "+sn+".src = \""+image_1+"\";\n"    " "+sn+"2 = new Image("+xs+", "+ys+");\n"
Roxen.git/server/modules/graphics/graphic_text.pike:682:    break;    }    }    return s;   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {   // Allow <accessed> and others inside <gtext>. -  contents = parse_rxml(contents, id, foo, defines); +  contents = parse_rxml(contents, id, foo/*, defines */);       string pre, post, defalign, gt, rest, magic;    int i, split;       // No images here, let's generate an alternative..    if(!id->supports->images || id->prestate->noimages)    {    if(!arg->split) contents=replace(contents,"\n", "\n<br>\n");    if(arg->submit) return "<input type=submit value=\""+contents+"\">";    switch(t)