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.55 1997/08/22 22:40:50 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.56 1997/08/25 13:51:35 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image   # define Font font
Roxen.git/server/modules/graphics/graphic_text.pike:569:    background->setcolor(@bgcolor);    background = background->rotate((float)args->rotate);    }       if(args->crop) background = background->autocrop();       return background;   }      string base_key; + object mc;      void start(int|void val, object|void conf)   { -  +  if(conf) +  { +  mc = conf;    base_key = "gtext:"+(conf?conf->name:roxen->current_configuration->name);    } -  + }      #ifdef QUANT_DEBUG   void print_colors(array from)   {   #if efun(color_name)    for(int i=0; i<sizeof(from); i++)    perror("%d: %s\n", i, color_name(from[i]));   #endif   }   #endif
Roxen.git/server/modules/graphics/graphic_text.pike:722:    default:    res += sprintf("%%%02x", in[i]);    }    return res;   }      int args_restored = 0;   void restore_cached_args()   {    args_restored = 1; -  object o = open(".gtext_args", "r"); +  object o = open(".gtext_args_"+hash(mc->name), "r");    if(o)    {    string data = o->read();    catch {    if(sizeof(indices(Gz)))    data=Gz->inflate()->inflate(data);    };    catch {    cached_args |= decode_value(data);    };    }   }      void save_cached_args()   {    restore_cached_args(); -  object o = open(".gtext_args", "wct"); +  object o = open(".gtext_args_"+hash(mc->name), "wct");    string data=encode_value(cached_args);    catch {    if(sizeof(indices(Gz)))    data=Gz->deflate()->deflate(data);    };    o->write(data);   }      mapping find_cached_args(int num)   {
Roxen.git/server/modules/graphics/graphic_text.pike:1134:   // (sizeof(id->misc->colors)-sizeof(c)+1)+")\n");    break;    }    c = c[..sizeof(c)-2];    }    id->misc->colors = c;   }      mapping query_tag_callers()   { -  return ([ -  "gtext-id":tag_gtext_id, -  ]) | (query("speedy")? +  return ([ "gtext-id":tag_gtext_id, ]) | (query("speedy")?([]):    (["font":tag_fix_color,    "body":tag_body,    "table":tag_fix_color,    "tr":tag_fix_color,    "td":tag_fix_color,    "layer":tag_fix_color,    "ilayer":tag_fix_color, -  +     "/td":pop_color,    "/tr":pop_color,    "/font":pop_color,    "/body":pop_color,    "/table":pop_color,    "/layer":pop_color, -  "/ilayer":pop_color, ]):([])); +  "/ilayer":pop_color, ]));   }         mapping query_container_callers()   {    return ([ "anfang":tag_graphicstext,    "gh":tag_graphicstext,    "gh1":tag_graphicstext, "gh2":tag_graphicstext,    "gh3":tag_graphicstext, "gh4":tag_graphicstext,    "gh5":tag_graphicstext, "gh6":tag_graphicstext,    "gtext":tag_graphicstext, ]);   }