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.43 1997/05/08 21:34:35 per Exp $"; + string cvs_version="$Id: graphic_text.pike,v 1.44 1997/05/30 09:18:14 per Exp $";      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array   import Image;   # define Image image   # define Font font   #endif      array register_module()   {    return ({ MODULE_LOCATION | MODULE_PARSER,    "Graphics text", -  "Makes a few new tags, which render text to gifs " -  "using the image module in pike. \n<p>" +  "Defines a few new containers, which all render text to gifs " +  "using the image module in pike.\n<p>"    "<b>&lt;gh1&gt;</b> to <b>&lt;gh6&gt;:</b> Headers<br>\n"    "<b>&lt;gh&gt;:</b> Header<br>\n"    "<b>&lt;gtext&gt;:</b> Graphical text<br>\n" -  "<b>&lt;anfang&gt;:</b> Make the first character to a " +  "<b>&lt;anfang&gt;:</b> Make the first character a "    "graphical one. Not all that usefull, really.<br>\n"    "<br>\n"    "<b>Common arguments:</b>\n <pre>"    " bg=color Use this background, default taken from the\n"    " &lt;body&gt; tag, if any\n"    " fg=color Use this foreground, default taken from the\n"    " &lt;body&gt; tag, if any\n" -  " font=fnt Use this font. The fonts can be found in the\n" +  " nfont=fnt Use this font. The fonts can be found in the\n"    " directory specified in the configuration\n"    " interface.\n"    " If no font is specified, the one from the\n" -  " define 'font' is used, or if there is no\n" +  " define 'nfont' is used, or if there is no\n"    " define, the default font will be used.\n" -  +  " bold Try to find a bold version of the font.\n" +  " italic Try to find an italic version of the font.\n" +  " black Try to find a black (heavy) version of the font.\n" +  " light Try to find a light version of the font.\n"    " scale=float Scale to this font, mostly useful in the &lt;gtext&gt;\n"    " tag, will not work at all in the &lt;gh[number]&gt;\n"    " tags.\n"    " 2 3 4 5 6 Short for scale=1.0/([number]*0.6)\n"    " notrans Do _not_ make the background color transparent\n"    " split Make each word into a separate gif image\n"    " href=url Link the image to the specified URL\n"    " The 'link' color of the document will be\n"    " used as the default foreground of the text\n"    " quant=cols Use this number of colors\n"
Roxen.git/server/modules/graphics/graphic_text.pike:59:    " 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"    " ghost=dist,blur,col\n" -  " Do a 'ghost text'. Do NOT use together with " -  " 'shadow'. Magic coloring won't work with it." +  " 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"    " Apply a turbulence filter, and use this as the\n"    " background.\n"    " maxlen=arg The maximum length of the rendered text will be\n"
Roxen.git/server/modules/graphics/graphic_text.pike:775:    return query_location()+num+"/";    else    return (string)num;   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {   // Allow <accessed> and others inside <gtext>.    +  +  if(arg->help) +  return register_module()[2]; +    #if efun(_static_modules)    contents = parse_rxml(contents, id, foo, defines);   #else    contents = parse_rxml(contents, id, foo);   #endif       string pre, post, defalign, gt, rest, magic;    int i, split;       // No images here, let's generate an alternative..