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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1:   // This is a ChiliMoon module. Copyright © 1996 - 2001, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.294 2002/11/11 01:53:34 mani Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.295 2002/11/16 10:41:32 agehall Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphics: Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:738:    data = ({ res, ({ len, img->ysize() }) });    }       return    ([    "data":data[0],    "meta":    ([    "xsize":data[1][0],    "ysize":data[1][1], -  "type":(args->format?id->conf->type_from_filename("x."+args->format):"image/gif"), +  "type":(args->format?id->conf->type_from_filename("x."+args->format):"image/png"),    ])    ]);   }      mapping find_internal(string f, RequestID id)   {    if( strlen(f)>4 && query("ext") && f[-4]=='.') // Remove .ext    f = f[..strlen(f)-5];    if( strlen(f) && f[0]=='$' )    {
Roxen.git/server/modules/graphics/graphic_text.pike:849: Inside #if ROXEN_COMPAT < 2.2
   if(compat_level < "2.2") {    p->compat = compat_level;    p->font = m_delete(arg, "nfont");    }   #endif       m_delete(arg,"src");    m_delete(arg,"width");    m_delete(arg,"height");    +  // Make format selection explicit since fallback may vary depending on +  // encoders present in this installation. +  if (!arg->format) +  arg->format = "png"; +    #if !constant(Image.GIF) || !constant(Image.GIF.encode)    // fadein or scroll not supported without GIF    m_delete(arg, "fadein");    m_delete(arg, "scroll"); - #endif -  -  // Make format selection explicit since fallback may vary depending on -  // encoders present in this installation. -  if (!arg->format) - #if constant(Image.GIF) && constant(Image.GIF.encode) -  arg->format = "gif"; +    #else -  arg->format = "jpg"; +  // These features requires the format to be GIF. +  if (arg->format != "gif") { +  m_delete(arg, "fadein"); +  m_delete(arg, "scroll"); +  }   #endif    -  foreach(filearg, string tmp) -  if(arg[tmp]) -  { -  p[tmp]=Roxen.fix_relative(arg[tmp],id); +  if ( arg->format == "png" && !arg["true-alpha"] ) { +  // Everyone wants truealpha if using PNG! +  arg["true-alpha"]=1; +  } +  +  foreach(arg & filearg; string index; string value) { +  p[index]=Roxen.fix_relative(value,id);    m_delete(arg,tmp);    }    - // if(arg->border && has_value(arg->border,",")) - // { - // p->border=arg->border; - // m_delete(arg,"border"); - // } -  +     array i = indices( arg );    foreach(textarg, string tmp)    foreach( glob( tmp, i ), string a )    {    if(a[0..5]!="magic-") {    p[a]=arg[a]; // ,id    i-=({ m_delete(arg,a) });    }    }