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 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.236 2000/09/10 23:24:44 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.237 2000/09/12 23:33:15 nilsson Exp $";      #include <module.h>   inherit "module";         // ------------------- Module registration ---------------------      constant module_type = MODULE_TAG;   constant module_name = "Graphic text";   constant module_doc =
Roxen.git/server/modules/graphics/graphic_text.pike:33:       defvar("ext", 0, "Append format to generated images",    TYPE_FLAG|VAR_MORE,    "Append the image format (.gif, .png, .gif, etc) to the generated "    "images. This is not necessary, but might seem nicer.");   }      TAGDOCUMENTATION;   #ifdef manual   constant gtextargs=#" - <attr name=afont> -  - </attr> -  +    <attr name=alpha value=path>    Use the specified image as an alpha channel, together with the    background attribute.   </attr>      <attr name=background value=path>    Specifies the image to use as background.   </attr>      <attr name=bevel value=width>
Roxen.git/server/modules/graphics/graphic_text.pike:70: Inside #if defined(manual)
  <gtext notrans=\"\" bgcolor=\"pink\">Pink</gtext>   <gtext notrans=\"\" bgcolor=\"#ff0000\">Red</gtext>   <gtext notrans=\"\" bgcolor=\"%50,0,100,0\">%50,0,100,0</gtext>    </ex>   </attr>      <attr name=bgturbulence value=frequency,color;frequency,color...>    Apply a turbulence effect on the background.   </attr>    + <attr name=bold> +  Use a bold version of the font, if available. Can not be used +  together with the black or light attributes. + <ex type=hor> + <gtext font='lucida'>Aa3</gtext><br /> + <gtext font='lucida' bold=''>Aa3</gtext><br /> + <gtext font='lucida' italic''>Aa3</gtext><br /> + <gtext font='lucida' bold='' italic=''>Aa3</gtext><br /> + </ex> + </attr> +    <attr name=black> -  Use a black, or heavy, version of the font, if available. +  Use a black, or heavy, version of the font, if available. Can +  not be used together with the bold or light attributes.   </attr>    - <attr name=bold> -  Use a bold version of the font, if available. + <attr name=light> +  Use a light version of the font, if available. Can not be used +  together with the bold or black attributes.   </attr>    -  + <attr name=italic> +  Use an italic version of the font, if available. + </attr> +    <attr name=bshadow value=distance>    Draw a blured black drop-shadow behind the text. Using 0 as distance    does not currently place the shadow directly below the text. Using    negative values for distance is possible, but you might have to add    'spacing'.    <ex type=vert>   <gtext scale=\"0.8\" fgcolor=\"#FF6600\" bshadow=\"1\">&lt;gtext bshadow=1&gt;</gtext><br />   <gtext scale=\"0.8\" fgcolor=\"#FF6600\" bshadow=\"2\">&lt;gtext bshadow=2&gt;</gtext>    </ex>   </attr>      <attr name=chisel>    Make the text look like it has been cut into the background.    <ex type=vert>   <gtext bold=\"\" ypad=\"-40%\" xpad=\"-20%\" chisel=\"\" talign=\"center\" - opaque=\"70\" fgcolor=\"gold\" bevel=\"2\" background=\"tiles.jpg\"> Chisel + opaque=\"70\" fgcolor=\"gold\" bevel=\"2\" background=\"/internal-roxen-test\"> Chisel   opaque=70</gtext>    </ex>   </attr>      <attr name=crop>    Remove all white-space around the image   </attr>      <attr name=encoding value=string>    Choose with which charset the text is encoded with.
Roxen.git/server/modules/graphics/graphic_text.pike:118: Inside #if defined(manual)
  </attr>      <attr name=fgcolor value=color>    Sets the text color.    <ex type=vert>   <gtext fgcolor=\"#0080FF\">#0080FF</gtext>    </ex>   </attr>      <attr name=font value=string> -  +  Selects which font to use. You can get a list of all available fonts +  by using the list fonts task in the administration interface, or by +  using the fonts emit plugin.   </attr>      <attr name=fontsize value=number> -  +  Selects which size of the font that should be used.   </attr>      <attr name=format value=string>    Set the image format, e.g. \"png\".   </attr>      <attr name=fs>    Apply floyd-steinberg dithering to the resulting image. Most of the    time it is much better to increase the number of colors, instead of    dithering the image, but sometimes when using very complex background
Roxen.git/server/modules/graphics/graphic_text.pike:155: Inside #if defined(manual)
     <attr name=glow value=color>    Apply a 'glow' filter to the image. Quite a CPU eater. Looks much    better on a dark background, where a real 'glow' effect can be    achieved.    <ex type=vert>   <gtext glow=\"red\">&lt;gtext glow=red&gt;</gtext>    </ex>   </attr>    - <attr name=italic> -  Use an italic version of the font, if available. - </attr> -  - <attr name=light> -  Use a light version of the font, if available. - </attr> -  +    <attr name=maxlen value=number>    Sets the maximum length of the text that will be rendered into an    image, by default 300.   </attr>      <attr name=mirrortile>    Tiles the background and foreground images around x-axis and y-axis    for odd frames, creating seamless textures.   </attr>      <attr name=move value=x,y>    Moves the text relative to the upper left corner of the background    image. This will not change the size of the image.   </attr>      <attr name=narrow>    Use a narroe version of the font, if available.   </attr>    - <attr name=nfont value=fontname> -  Select a font using somewhat more memonic font-names. You can get a -  font-list by accessing the administration interface. -  -  <p>There are several modifiers available: bold, italic, black and light. -  If the requested version of the font is available, it will be used to -  render the text, otherwise the closest match will be used.</p> -  -  <ex type=vert> - <gtext nfont=\"futura\" light=\"\" >Light</gtext> - <gtext nfont=\"futura\" light=\"\" italic=\"\">Italic</gtext> - <gtext nfont=\"futura\" >Normal</gtext> - <gtext nfont=\"futura\" italic=\"\" >Italic</gtext> - <gtext nfont=\"futura\" bold=\"\" >Bold</gtext> - <gtext nfont=\"futura\" bold=\"\" italic=\"\">Italic</gtext> - <gtext nfont=\"futura\" black=\"\" >Black</gtext> - <gtext nfont=\"futura\" black=\"\" italic=\"\">Italic</gtext> -  </ex> - </attr> -  +    <attr name=notrans>    Do not make the background transparent. Useful when making 'boxes' of    color around the text.    <ex type=vert>   <gtext bgcolor=\"red\">&lt;gtext bgcolor=red&gt;</gtext>   <gtext bgcolor=\"red\" notrans=\"\">&lt;gtext bgcolor=red notrans&gt;</gtext>    </ex>   </attr>      <attr name=nowhitespace>
Roxen.git/server/modules/graphics/graphic_text.pike:566:    }    res+="\n";    }    text=replace(res[..strlen(res)-2], ({"!","?",": "}),({ nbsp+"!",nbsp+"?",nbsp+": "}));    text=replace(replace(replace(text,({". ",". "+nbsp}),    ({"\000","\001"})),".","."+nbsp+nbsp),    ({"\000","\001"}),({". ","."+nbsp}));    }       if( args->afont ) -  font = resolve_font((args->afont||args->font)+" "+(args["fontsize"]||32)); +  font = resolve_font(args->afont+" "+(args["fontsize"]||32));    else    {    int bold=0, italic=0;    if(args->nfont) args->font = args->nfont;    if(args->bold) bold=1;    if(args->light) bold=-1;    if(args->black) bold=2;    if(args->italic) italic=1;    font = get_font(args->font||"default",    (int)args["fontsize"]||32,