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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.215 2000/03/16 03:01:23 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.216 2000/03/18 19:04:11 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";         // ------------------- Module registration ---------------------      constant module_type = MODULE_PARSER;   constant module_name = "Graphics text";
Roxen.git/server/modules/graphics/graphic_text.pike:658:   constant filearg=({"background","texture","alpha","magic-texture","magic-background","magic-alpha"});   constant textarg=({"afont",    "alpha",    "bevel",    "bgcolor",    "bgturbulence",    "black",    "bold",    "bshadow",    "chisel", -  "crop", +     "encoding",    "fadein",    "fgcolor", -  "fs", +     "font",    "font-size", -  "format", +     "ghost",    "glow",    "italic",    "light",    "mirrortile",    "move",    "narrow",    "nfont",    "notrans",    "opaque",    "outline",    "pressed", -  "quant", +     "rescale",    "rotate",    "scale",    "scolor",    "scroll",    "shadow",    "size",    "spacing",    "talign",    "tile",    "textbox",    "textbelow",    "textscale",    "verbatim",    "xpad",    "xsize",    "xspacing",    "ypad",    "ysize",    "yspacing" -  +  +  /* generic argcache arguments */ +  "crop", +  "format", +  "quant", +  "dither", +  "fs", +  "*-*", +  "gamma", +    });      constant theme=({"fgcolor","bgcolor","font"});      constant hreffilter=(["split":1,"magic":1,"noxml":1,"alt":1]);    - mapping mk_gtext_arg(mapping arg, RequestID id) { -  + mapping mk_gtext_arg(mapping arg, RequestID id) + {    mapping p=([]); //Picture rendering arguments.       m_delete(arg,"src");    m_delete(arg,"width");    m_delete(arg,"height");       foreach(filearg, string tmp)    if(arg[tmp]) {    p[tmp]=fix_relative(arg[tmp],id);    m_delete(arg,tmp);    }       if(arg->border && search(arg->border,",")) {    p->border=arg->border;    m_delete(arg,"border");    }    -  +  array i = indices( arg );    foreach(textarg, string tmp) -  if(arg[tmp]) { -  p[tmp]=arg[tmp],id; -  m_delete(arg,tmp); +  foreach( glob( tmp, i ), string a ) +  { +  p[a]=arg[a]; // ,id +  m_delete(arg,a);    }       foreach(theme, string tmp)    if( (id->misc->defines[tmp] || id->misc->defines["theme_"+tmp]) && !p[tmp])    p[tmp]=id->misc->defines["theme_"+tmp] || id->misc->defines[tmp];       if(!p->fgcolor) p->fgcolor="#000000";    if(!p->bgcolor) p->bgcolor="#ffffff";    -  if(id->misc->defines->nfont && !p->nfont) p->nfont=id->misc->gtext_nfont; -  if(id->misc->defines->afont && !p->afont) p->afont=id->misc->gtext_afont; -  if(id->misc->defines->bold && !p->bold) p->bold=id->misc->gtext_bold; +  if(id->misc->defines->nfont && !p->nfont) p->nfont=id->misc->gtext_nfont; +  if(id->misc->defines->afont && !p->afont) p->afont=id->misc->gtext_afont; +  if(id->misc->defines->bold && !p->bold) p->bold=id->misc->gtext_bold;    if(id->misc->defines->italic && !p->italic) p->italic=id->misc->gtext_italic; -  if(id->misc->defines->black && !p->black) p->black=id->misc->gtext_black; +  if(id->misc->defines->black && !p->black) p->black=id->misc->gtext_black;    if(id->misc->defines->narrow && !p->narrow) p->narrow=id->misc->gtext_narrow;       return p;   }      string fix_text(string c, mapping m, RequestID id) {       if(m->nowhitespace)    {    c=String.trim_all_whites(c);