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 - 2009, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.311 2009/11/30 15:01:58 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.312 2009/12/01 18:06:38 grubba 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:1218:    if(arg->split)    {    string res="",split=arg->split;    if(lower_case(split)=="split") split=" ";    m_delete(arg,"split");    c=replace(c, "\n", " ");    int setalt=!arg->alt;    foreach(c/split-({""}), string word)    {    string fn = image_cache->store( ({ p, word }), id, timeout ); -  mapping size = image_cache->metadata( fn, id, no_draw); +  mapping size = image_cache->metadata( fn, id, no_draw, timeout);    if(setalt) arg->alt=word;    arg->src=query_absolute_internal_location(id)+fn+ext;    if( size )    {    arg->width = (string)size->xsize;    arg->height = (string)size->ysize;    }    else {    m_delete (arg, "width");    m_delete (arg, "height");    }    res+=Roxen.make_tag( "img", arg, xml )+" ";    }    return sprintf(lp,res);    }       string num = image_cache->store( ({ p, c }), id, timeout ); -  mapping size = image_cache->metadata( num, id, no_draw ); +  mapping size = image_cache->metadata( num, id, no_draw, timeout );    if(!arg->alt) arg->alt=replace(c,"\"","'");       arg->src=query_absolute_internal_location(id)+num+ext;    if(size) {    arg->width=(string)size->xsize;    arg->height=(string)size->ysize;    }       if(arg->magic)    {
Roxen.git/server/modules/graphics/graphic_text.pike:1259:    if(p->bevel) p->pressed=1;       m_delete(p, "fgcolor");    foreach(glob("magic-*", indices(arg)), string q)    p[q[6..]]=m_delete(arg, q);       if(!p->fgcolor) p->fgcolor=id->misc->defines->theme_alink||    id->misc->defines->alink||"#ff0000";       string num2 = image_cache->store( ({ p, c }), id, timeout ); -  size = image_cache->metadata( num2, id ); +  size = image_cache->metadata( num2, id, UNDEFINED, timeout );    if(size) {    arg->width=(string)max(arg->xsize,size->xsize);    arg->height=(string)max(arg->ysize,size->ysize);    }      #ifdef GTEXT_RANDOM_PREFIX    string sn = "gtext" + get_gtext_pfx(id) + id->root_id->misc->gtext_mi++;   #else    string sn = "gtext" + id->root_id->misc->gtext_mi++;   #endif