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.24 1997/01/29 04:59:41 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.25 1997/02/07 23:33:20 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:874:   string tag_body(string t, mapping args, object id, object file,    mapping defines)   {    int cols,changed;    if(args->bgcolor||args->text||args->link||args->alink    ||args->background||args->vlink)    cols=1;      #define FIX(Y,Z,X) do{if(!args->Y){if(cols){defines->X=Z;args->Y=Z;changed=1;}}else{defines->X=args->Y;if(args->Y[0]!='#'){args->Y=ns_color(parse_color(args->Y));changed=1;}}}while(0)    +  if(!search(id->client*"","Mosaic")) +  { +  FIX(bgcolor,"#bfbfbf",bg); +  FIX(text, "#000000",fg); +  FIX(link, "#0000b0",link); +  FIX(alink, "#3f0f7b",alink); +  FIX(vlink, "#ff0000",vlink); +  } else {    FIX(bgcolor,"#c0c0c0",bg); -  FIX(text,"#000000",fg); -  FIX(link,"#0000ff",link); -  FIX(alink,"#00ffff",alink); -  FIX(vlink,"#2000ee",vlink); -  if(changed) -  return ("<body "+make_args(args)+">"); +  FIX(text, "#000000",fg); +  FIX(link, "#0000ee",link); +  FIX(alink, "#ff0000",alink); +  FIX(vlink, "#551a8b",vlink);    } -  +  if(changed) return ("<body "+make_args(args)+">"); + }      string tag_fix_color(string tagname, mapping args, object id, object file,    mapping defines)   {    int changed;   #define FIX(X,Y) if(args->X){defines->Y=args->X;if(args->X[0]!='#'){args->X=ns_color(parse_color(args->X));changed = 1;}}       FIX(bgcolor,bg);    FIX(text,fg);    FIX(color,fg);