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.259 2001/01/30 23:48:46 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.260 2001/02/20 09:48:09 kuntri 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:109: Inside #if defined(manual)
  <attr name='italic'><p>    Use an italic version of the font, if available.</p>   </attr>      <attr name='bshadow' value='distance'><p>    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'.</p>    <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> + <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'><p>    Make the text look like it has been cut into the background.</p>    <ex type=vert>   <gtext font=\"lucida\" bold=\"\" chisel=\"\" talign=\"center\" tile=\"\" - opaque=\"70\" fgcolor=\"gold\" bevel=\"2\" background=\"/internal-roxen-squares\"> Chisel - opaque=70</gtext> + opaque=\"70\" fgcolor=\"gold\" bevel=\"2\" + background=\"/internal-roxen-squares\"> Chisel opaque=\"70\"</gtext>    </ex>   </attr>      <attr name='crop'><p>    Remove all white-space around the image.</p>   </attr>      <attr name='encoding' value='string'><p>    Choose with which charset the text is encoded with.</p>   </attr>
Roxen.git/server/modules/graphics/graphic_text.pike:166: Inside #if defined(manual)
  <attr name='fs'><p>    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    images dithering is O.K.</p>   </attr>      <attr name='ghost' value='dist,blur,color'><p>    Apply a ghost effect. Cannot be used together with shadow or magic    coloring.</p> -  <ex type=vert> +  <ex type='vert'>   <gtext spacing=\"2\" crop=\"\" ghost=\"1,1,red\">ghost=1,1,red</gtext>   <gtext spacing=\"2\" crop=\"\" ghost=\"1,3,blue\">ghost=1,3,blue</gtext> - <gtext spacing=\"2\" crop=\"\" bshadow=\"1\" opaque=\"90\" ghost=\"-1,1,yellow\">ghost=-1,1,yellow opaque=90 bshadow=1</gtext> + <gtext spacing=\"2\" crop=\"\" bshadow=\"1\" opaque=\"90\" ghost=\"-1,1,yellow\"> + ghost=-1,1,yellow opaque=90 bshadow=1</gtext>    </ex>   </attr>      <attr name='glow' value='color'><p>    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.</p>    <ex type=vert>   <gtext glow=\"red\">&lt;gtext glow=red&gt;</gtext>    </ex>
Roxen.git/server/modules/graphics/graphic_text.pike:192: Inside #if defined(manual)
  <attr name='maxlen' value='number'><p>    Sets the maximum length of the text that will be rendered into an    image, by default 300.</p>   </attr>      <attr name='move' value='x,y'><p>    Moves the text relative to the upper left corner of the background    image. This will not change the size of the image.</p>   </attr>    - <attr name='narrow><p> + <attr name='narrow'><p>    Use a narroe version of the font, if available.</p>   </attr>      <attr name='notrans'><p>    Do not make the background transparent. Useful when making 'boxes' of    color around the text.</p>    <ex type=vert> - <gtext bgcolor=\"red\">&lt;gtext bgcolor=red&gt;</gtext> - <gtext bgcolor=\"red\" notrans=\"\">&lt;gtext bgcolor=red notrans&gt;</gtext> + <gtext bgcolor=\"red\">&lt;gtext bgcolor=red&gt;</gtext><br /> + <gtext bgcolor=\"red\" notrans=\"\">&lt;gtext + bgcolor=red notrans&gt;</gtext>    </ex>   </attr>      <attr name='nowhitespace'><p>    Removes all whitespaces before and after the real text.</p>   </attr>      <attr name='opaque' value='percentage'><p>    Sets the 'opaque' value of the color used to draw the text. Default    is 100%. In the example below, notice how the text color mixes with    the two background colors.</p>    <ex type=vert>   <gtext scale=\"0.6\" textbox=\"100,pink,-11\" bgcolor=\"lightblue\" -  notrans=\"\" opaque=\"40\" fgcolor=\"black\">&lt;Demonstration of opaque text&gt;</gtext> + notrans=\"\" opaque=\"40\" fgcolor=\"black\" + >&lt;Demonstration of opaque text&gt;</gtext>    </ex>   </attr>      <attr name='outline' value='color,extra-radius'><p>    Draw an outline around the text. Quite useful when combined with    textscale.</p>    <ex type=vert> - <gtext xspacing=\"4\" quant=\"128\" textscale=\"red,red,yellow,yellow\" outline=\"black,1\">black, 2 pixels</gtext> + <gtext xspacing=\"4\" quant=\"128\" textscale=\"red,red,yellow,yellow\" + outline=\"black,1\" + >black, 2 pixels</gtext>    </ex>   </attr>      <attr name='pressed'><p>    Inverts the direction of the bevel box, to make it look like a button    that is pressed down. The magic modifier will do this automatically.</p>   </attr>      <attr name='quant' value='number'><p>    Quantifies the image with this number of colors. Using a lower number
Roxen.git/server/modules/graphics/graphic_text.pike:277: Inside #if defined(manual)
     <attr name='scroll' value='width,steps,delay'><p>    Generate an animated GIF image of the text scrolling.</p>   </attr>      <attr name='shadow' value='intensity,distance'><p>    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,</p>    <ex type=vert> - <gtext scale=\"0.8\" fgcolor=\"blue\" shadow=\"40,0\">&lt;gtext shadow=40,0&gt;</gtext><br /> - <gtext scale=\"0.8\" fgcolor=\"blue\" shadow=\"40,2\">&lt;gtext shadow=40,2&gt;</gtext><br /> + <gtext scale=\"0.8\" fgcolor=\"blue\" shadow=\"40,0\">&lt;gtext + shadow=40,0&gt;</gtext><br /> +  + <gtext scale=\"0.8\" fgcolor=\"blue\" shadow=\"40,2\">&lt;gtext + shadow=40,2&gt;</gtext><br />    </ex>   </attr>      <attr name='size' value='width,height'><p>    Set the size of the image.</p>   </attr>      <attr name='spacing' value='number'><p>    Add space around the text.</p>   </attr>      <attr name='talign' value='left|right|center'><p>    Adjust the alignment of the text.</p>   </attr>      <attr name='textbelow' value='color'><p>    Place the text centered in a box of the given color below the image    area. Useful together with background to make captions for images.</p>    <ex type=vert>   <img src=\"/internal-roxen-roxen\" /> &nbsp; - <gtext scale=\"0.5\" background=\"/internal-roxen-roxen\" textbelow=\"#c0c0c0\">Roxen</gtext> + <gtext scale=\"0.5\" background=\"/internal-roxen-roxen\" + textbelow=\"#c0c0c0\">Roxen</gtext>    </ex>   </attr>      <attr name='textbox' value='opaque,color'><p>    Draw a box with an opaque value below the text of the specified color.</p>   </attr>      <attr name='textscale' value='color,color,color,color'><p>    Apply a color filter to the text. The colors are,    respectively, upper left, lower left, upper right and lower right.    It is probably a good idea to increase the 'quant' value when    using this argument.</p>    <ex type=vert> - <gtext quant=\"128\" textscale=\"blue,red,black,darkgreen\">Blue, red, black, darkgreen</gtext> + <gtext quant=\"128\" textscale=\"blue,red,black,darkgreen\" + >Blue, red, black, darkgreen</gtext>    </ex>   </attr>      <attr name='texture' value='path'><p>    Uses the specified images as a field texture.</p>   <ex type=hor> - <gtext font=\"yikes\" fontsize=\"100\" texture=\"/internal-roxen-squares\">A</gtext> + <gtext font=\"yikes\" fontsize=\"100\" + texture=\"/internal-roxen-squares\">A</gtext>   </ex>   </attr>      <attr name='verbatim'><p>    Allows the gtext parser to not be typographically correct.</p>   </attr>      "   // <attr name=xpad' value='percentage>   // Sets the padding between characters.
Roxen.git/server/modules/graphics/graphic_text.pike:460:    </ex>   </attr>      <attr name='noxml'><p>    Do not terminate the image tag with \"/\".</p>   </attr>      <attr name='split'>    <p>Make each word into a separate gif image. Useful if you are    writing a large text, and word wrap at the edges of the display is -  desired. This text is an example (try resisizing your browser window, -  the images should move just like normal text would).</p> +  desired.</p>      <ex type='vert'>    <gtext scale='0.4' split='split'>    Useful if you are writing a large text, and word wrap at the edges -  of the display is desired. This text is an example (try resisizing -  your browser window, the images should move just like normal text -  would). +  of the display is desired.    </gtext>   </ex>       <p>This will allow the browser to word-wrap the text, but will -  disable certain attributes like <att>magic</att>.</p> +  disable certain attributes like <att>magic</att>. Note that the word +  wraping functionality of this example cannot be shown as the size of +  the browser window is determined by the largest example box. </p>       <ex type='vert'>   <gtext scale=\"0.4\" split=\"\">Make each word..</gtext>    </ex>   </attr>      <attr name='submit'><p>    Creates a submit-button for forms. Does not work together with    <att>split</att> or <att>magic</att> attributes.</p>   </attr>"+gtextargs,