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.245 2000/09/19 14:21:32 kuntri Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.246 2000/09/19 14:58:29 per Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:531:    Image.Image img;       if( objectp( text ) )    {    if( !args->text )    error("Failed miserably to find a text to draw. That's not"    " good.\n");    id = (object)text;    text = args->text;    } -  +  if( !mappingp( args ) || !stringp( text )) +  // errors in the argument cache. Not all that unsusual when using the +  // relay module. +  return 0;    if(!args->verbatim) // typographically correct...    {    text = replace(text, nbsp, " ");    text = simplify_text( text );    string res="",nspace="",cspace="";    foreach(text/"\n", string line)    {    cspace="";    nspace="";    foreach(line/" ", string word)
Roxen.git/server/modules/graphics/graphic_text.pike:661:    ([    "xsize":data[1][0],    "ysize":data[1][1],    "type":(args->format?id->conf->type_from_filename("x."+args->format):"image/gif"),    ])    ]);   }      mapping find_internal(string f, RequestID id)   { +  catch +  {    if( strlen(f)>4 && query("ext") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5];    if( strlen(f) && f[0]=='$' )    {    array id_text = f/"/";    if( sizeof(id_text)==2 )    { // It's a gtext-id    string second_key = roxen->argcache->store( (["":id_text[1]]) );    return image_cache->http_file_answer( id_text[0][1..] +"$"+ second_key, id );    }    }    return image_cache->http_file_answer( f, id ); -  +  }; +  return 0;   }         // -------------- helpfunctions to gtext tags and containers -----------------      constant filearg=({"background","texture","alpha","magic-texture","magic-background","magic-alpha"});   constant textarg=({"afont",    "alpha",    "bevel",    "bgcolor",