Branch: Tag:

2003-10-16

2003-10-16 11:46:15 by Anders Johansson <anders@roxen.com>

Added option to generate images on first request.

Rev: server/modules/graphics/cimg.pike:1.61
Rev: server/modules/graphics/gbutton.pike:1.101
Rev: server/modules/graphics/graphic_text.pike:1.294

1:   // This is a roxen module. Copyright © 1996 - 2001, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.293 2003/10/03 11:40:46 wellhard Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.294 2003/10/16 11:46:15 anders Exp $";      #include <module.h>   inherit "module";
1064:       if(!arg->border) arg->border="0";    +  int no_draw = !id->misc->generate_images;    if(arg->split)    {    string res="",split=arg->split;
1074:    foreach(c/split-({""}), string word)    {    string fn = image_cache->store( ({ p, word }),id ); -  mapping size = image_cache->metadata( fn, id, 1 ); +  mapping size = image_cache->metadata( fn, id, no_draw);    if(setalt) arg->alt=word;    arg->src=query_absolute_internal_location(id)+fn+ext;    if( size )
1092:    }       string num = image_cache->store( ({ p, c }), id ); -  mapping size = image_cache->metadata( num, id, 1 ); +  mapping size = image_cache->metadata( num, id, no_draw );    if(!arg->alt) arg->alt=replace(c,"\"","'");       arg->src=query_absolute_internal_location(id)+num+ext;