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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.174 1999/05/19 03:47:06 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.175 1999/05/19 07:07:09 peter Exp $";   constant thread_safe=1;      #include <config.h>   #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0
Roxen.git/server/modules/graphics/graphic_text.pike:686:    "xsize":data[1][0],    "ysize":data[1][1],    "type":"image/gif",    ])    ]);   }         mapping find_internal(string f, object rid)   { -  if( query("gif") && f[-4]=='.') // Remove .ext +  if( strlen(f)>4 && query("gif") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5];    return image_cache->http_file_answer( f, rid );   }      string magic_javascript_header(object id)   {    if(!id->supports->netscape_javascript || !id->supports->images) return "";    return    ("\n<script>\n"    "function i(ri,hi,txt)\n"
Roxen.git/server/modules/graphics/graphic_text.pike:782:    if(arg->magic_background)    arg->magic_background=fix_relative(arg->magic_background,id);    if(arg->magicbg)    arg->magicbg = fix_relative(arg->magicbg,id);    if(arg->alpha)    arg->alpha = fix_relative(arg->alpha,id);       arg->text = ctn;       if(!short) -  return query_internal_location()+image_cache->store( arg, id ); +  return query_internal_location()+image_cache->store( arg, id )+ +  (query("gif")?".foo":"");    else -  return image_cache->store( arg, id ); +  return image_cache->store( arg, id )+(query("gif")?".foo":"");   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {    if((contents-" ")=="")    return "";   //Allow <accessed> and others inside <gtext>.    if(arg->nowhitespace)    {
Roxen.git/server/modules/graphics/graphic_text.pike:816:    arg->magic_texture=fix_relative(arg->magic_texture,id);    if(arg->magic_background)    arg->magic_background=fix_relative(arg->magic_background,id);    if(arg->magicbg)    arg->magicbg = fix_relative(arg->magicbg,id);    if(arg->alpha)    arg->alpha = fix_relative(arg->alpha,id);          string gif=""; -  if(query("gif")) gif=".gif"; +  if(query("gif")) gif="."+(arg->format?arg->format[..2]:"gif");      #if efun(_static_modules)    contents = parse_rxml(contents, id, foo, defines);   #else    contents = parse_rxml(contents, id, foo);   #endif       string lp, url, ea;    string pre, post, defalign, gt, rest, magic;    int i;
Roxen.git/server/modules/graphics/graphic_text.pike:878:    {    if (sizeof(split=arg->split) != 1)    split = " ";    m_delete(arg,"split");    }       // Support for <gh 2> like things.    for(i=2; i<10; i++)    if(arg[(string)i])    { -  arg->scale = 1.0 / ((float)i*0.6); +  arg->scale = (string)(1.0 / ((float)i*0.6));    m_delete(arg, (string)i);    break;    }       // Support for <gh1> like things.    if(sscanf(t, "%s%d", t, i)==2) -  if(i > 1) arg->scale = 1.0 / ((float)i*0.6); +  if(i > 1) arg->scale = (string)(1.0 / ((float)i*0.6));       string na = arg->name, al=arg->align;    m_delete(arg, "name"); m_delete(arg, "align");       // Now the 'arg' mapping is modified enough..    gt=contents;    rest="";       switch(t)    {
Roxen.git/server/modules/graphics/graphic_text.pike:971:       string num2 = image_cache->store( arg );    size = image_cache->metadata( arg, id );       if(!defines->magic_java)    res = magic_javascript_header(id);    defines->magic_java="yes";    if(!size) size = ([ ]);    return replace(res +    magic_image(url||"", size->xsize, size->ysize, "i"+(defines->mi++), -  query_internal_location()+num+"/"+gif, -  query_internal_location()+num2+"/"+gif, +  query_internal_location()+num+gif, +  query_internal_location()+num2+gif,    (arg->alt?arg->alt:replace(gt, "\"","'")),    (magic=="magic"?0:magic),    id,input?na||"submit":0,ea,lp),    "</script>\n<script>","");    }    if(input)    return (pre+"<input type=image name=\""+na+"\" border=0 alt=\""+    (arg->alt?arg->alt:replace(gt,"\"","'"))+    "\" src="+query_internal_location()+num+gif    +" align="+(al || defalign)+ea+