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

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - string cvs_version="$Id: graphic_text.pike,v 1.47 1997/07/06 18:40:33 grubba Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.48 1997/07/10 16:28:37 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image   # define Font font
Roxen.git/server/modules/graphics/graphic_text.pike:62:    " ysize=int Use this (absolute) size\n"    " bevel=int Draw a bevel box (width is the argument)\n"    " pressed Invert the \"direction\" of the bevel box\n"    " talign=dir Justify the text to the left, right, or center\n"    " textbox=al,col. Use 'al' as opaque value to draw a box below\n"    " the text with the specified color.\n"    " xpad=X% Increase padding between characters with X%\n"    " xpad=Y% Increase padding between lines with Y%\n"    " shadow=int,dist Draw a drop-shadow (variable distance/intensity)\n"    " bshadow=dist Draw a blured drop-shadow (variable distance)\n" +  " scolor=color Use this color as the shadow color.\n"    " ghost=dist,blur,col\n"    " Do a 'ghost text'. Do NOT use together with\n"    " 'shadow'. Magic coloring won't work with it.\n"    " glow=color Draw a 'glow' outline around the text.\n"    " opaque=0-100% Draw with more or less opaque text (100%\n"    " is default)\n"    " rotate=ang(deg.)Rotate the finished image\n"    " background=file Use the specifed file as a background\n"    " texture=file Use the specified file as text texture\n"    " turbulence=args args is: frequency,color;freq,col;freq,col\n"
Roxen.git/server/modules/graphics/graphic_text.pike:482:    fgcolor=bgcolor;    }          if(args->shadow)    {    int sd = ((int)args->shadow+10)*2;    int sdist = ((int)(args->shadow/",")[-1])+2;    object ta = text_alpha->copy();    ta = ta->color(256-sd,256-sd,256-sd); -  background->paste_alpha_color(ta,0,0,0,xoffset+sdist, yoffset+sdist); +  array sc = parse_color(args->scolor||"black"); +  background->paste_alpha_color(ta,sc[0],sc[1],sc[2], +  xoffset+sdist,yoffset+sdist);    }      #define MIN(x,y) ((x)<(y)?(x):(y))       if(args->bshadow)    {    int sdist = (int)(args->bshadow)+1;    int xs,ys;    xs = text_alpha->xsize()+sdist*2+4;    ys = text_alpha->ysize()+sdist*2+4; -  object ta = Image(xs,ys); -  ta->paste(text_alpha,sdist,sdist); +  object ta = Image(xs+sdist*2,ys+sdist*2); +  array sc = parse_color(args->scolor||"black"); +  +  ta->paste_alpha_color(text_alpha,255,255,255,sdist,sdist);    ta = blur(ta, MIN((sdist/2),1))->color(256,256,256); -  background->paste_alpha_color(ta,0,0,0,xoffset,yoffset); +  +  background->paste_alpha_color(ta,sc[0],sc[1],sc[2], +  xoffset+sdist,yoffset+sdist);    }       if(args->glow)    {    int amnt = (int)(args->glow/",")[-1]+2;    array (int) blurc = parse_color((args->glow/",")[0]);    background->paste_alpha_color(blur(text_alpha, amnt),@blurc,    xoffset-amnt, yoffset-amnt);    }