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.161 1998/12/30 00:13:47 js Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.162 1999/01/21 15:51:19 marcus Exp $";   constant thread_safe=1;      #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */
Roxen.git/server/modules/graphics/graphic_text.pike:271:    corner=0;    in->paste_mask(corner2, corner2->color(70,70,70), -1, -1);       corner2 = pix = 0;    return in;   }         object make_text_image(mapping args, object font, string text,object id)   { -  object text_alpha= -  font->write(@(args->encoding? -  Array.map(text/"\n", -  lambda(string s, object d) { -  return d->feed(s)->drain(); -  }, -  Locale.Charset.decoder(args->encoding)) -  :text/"\n")); +  object text_alpha=font->write(@(args->encoding? +  (Locale.Charset.decoder(args->encoding)-> +  feed(text)->drain())/"\n" : +  text/"\n"));    int xoffset=0, yoffset=0;       if(!text_alpha->xsize() || !text_alpha->ysize())    text_alpha = Image.image(10,10, 0,0,0);      // perror("Making image of '%s', args=%O\n", text, args);       if(int op=((((int)args->opaque)*255)/100)) // Transparent text...    text_alpha=text_alpha->color(op,op,op);