Branch: Tag:


2001-08-30 12:20:33 by Johan Sundström <>

s/ex type='vert'/ex/

Rev: server/modules/graphics/graphic_text.pike:1.276

1:   // This is a roxen module. Copyright ¬© 1996 - 2000, Roxen IS.   //    - constant cvs_version="$Id: graphic_text.pike,v 1.275 2001/08/23 21:20:59 nilsson Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.276 2001/08/30 12:20:33 jhs Exp $";      #include <module.h>   inherit "module";
69: Inside #if defined(manual)
     <attr name='bevel' value='width'><p>    Draws a bevel-box around the text.</p> -  <ex type=vert> +  <ex>   <gtext bevel=\"2\">Ok</gtext>    </ex>   </attr>
81: Inside #if defined(manual)
      <p>If you set the background color, it is probably best to add the    notrans attribute as well.</p> -  <ex type=vert> +  <ex>   <gtext notrans=\"\" bgcolor=\"pink\">Pink</gtext>   <gtext notrans=\"\" bgcolor=\"#ff0000\">Red</gtext>   <gtext notrans=\"\" bgcolor=\"%50,0,100,0\">%50,0,100,0</gtext>
95: Inside #if defined(manual)
  <attr name='bold'><p>    Use a bold version of the font, if available. Can not be used    together with the black or light attributes.</p> - <ex type=hor> + <ex>   <gtext font='lucida'>Aa3</gtext><br />   <gtext font='lucida' bold=''>Aa3</gtext><br />   <gtext font='lucida' italic=''>Aa3</gtext><br />
122: Inside #if defined(manual)
   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> +  <ex>   <gtext scale=\"0.8\" fgcolor=\"#FF6600\"   bshadow=\"1\">&lt;gtext bshadow=1&gt;</gtext>   <br /><gtext scale=\"0.8\" fgcolor=\"#FF6600\"
132: Inside #if defined(manual)
     <attr name='chisel'><p>    Make the text look like it has been cut into the background.</p> -  <ex type=vert> +  <ex>   <gtext font=\"lucida\" bold=\"\" chisel=\"\" talign=\"center\" tile=\"\"   opaque=\"70\" fgcolor=\"gold\" bevel=\"2\"   background=\"/internal-roxen-squares\"> Chisel opaque=\"70\"</gtext>
153: Inside #if defined(manual)
     <attr name='fgcolor' value='color'><p>    Sets the text color.</p> -  <ex type=vert> +  <ex>   <gtext fgcolor=\"#0080FF\">#0080FF</gtext>    </ex>   </attr>
182: Inside #if defined(manual)
  <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'><gtext spacing=\"2\" crop=\"\" ghost=\"1,1,red\">ghost=1,1,red</gtext></ex> +  <ex><gtext spacing=\"2\" crop=\"\" ghost=\"1,1,red\">ghost=1,1,red</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> +  <ex>   <gtext glow=\"red\">&lt;gtext glow=red&gt;</gtext>    </ex>   </attr>
211: Inside #if defined(manual)
  <attr name='notrans'><p>    Do not make the background transparent. Useful when making 'boxes' of    color around the text.</p> -  <ex type=vert> +  <ex>   <gtext bgcolor=\"red\">&lt;gtext bgcolor=red&gt;</gtext><br />   <gtext bgcolor=\"red\" notrans=\"\">&lt;gtext   bgcolor=red notrans&gt;</gtext>
226: Inside #if defined(manual)
   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> +  <ex>   <gtext scale=\"0.6\" textbox=\"100,pink,-11\" bgcolor=\"lightblue\"   notrans=\"\" opaque=\"40\" fgcolor=\"black\"   >&lt;Demonstration of opaque text&gt;</gtext>
236: Inside #if defined(manual)
  <attr name='outline' value='color,extra-radius'><p>    Draw an outline around the text. Quite useful when combined with    textscale.</p> -  <ex type=vert> +  <ex>   <gtext xspacing=\"4\" quant=\"128\" textscale=\"red,red,yellow,yellow\"   outline=\"black,1\"   >black, 2 pixels</gtext>
256: Inside #if defined(manual)
   is quite useless. It is advisable to use powers of 2 to optimize the    palette allocation.</p>    -  <ex type=vert> +  <ex>   <gtext quant=\"2\">A</gtext>   <gtext quant=\"6\">A</gtext>   <gtext quant=\"20\">A</gtext>
274: Inside #if defined(manual)
     <attr name='scale' value='number'><p>    Sets the scale of the image. Larger than 1.0 is enlargement.</p> -  <ex type=vert> +  <ex>   <gtext scale=\"1.0\">&lt;gtext scale=1.0&gt;</gtext>   <gtext scale=\"0.5\">&lt;gtext scale=0.5&gt;</gtext>    </ex>
292: Inside #if defined(manual)
   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\" +  <ex><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></ex>
313: Inside #if defined(manual)
  <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> +  <ex>   <img src=\"/internal-roxen-roxen\" /> &nbsp;   <gtext scale=\"0.5\" background=\"/internal-roxen-roxen\"   textbelow=\"#c0c0c0\">Roxen</gtext>
329: Inside #if defined(manual)
   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> +  <ex>   <gtext quant=\"128\" textscale=\"blue,white,red,darkgreen\"   >Blue, white,   red, darkgreen</gtext>
338: Inside #if defined(manual)
     <attr name='texture' value='path'><p>    Uses the specified images as a field texture.</p> - <ex type=hor> + <ex>   <gtext font=\"\" fontsize=\"100\"   texture=\"/internal-roxen-squares\">A</gtext>   </ex>
356: Inside #if defined(manual)
   will not have any effect at all. This depends on the type of the font    and the font implementation.</p>    - <ex type='vert'> + <ex>   <gtext font=\"niquel\">HELLO ROXEN</gtext><br />   <gtext xpad=\"4\" font=\"niquel\">HELLO ROXEN</gtext><br />   <gtext xpad=\"50%\" font=\"niquel\">HELLO ROXEN</gtext><br />
390: Inside #if defined(manual)
   Creates an anfang in the beginning of a text.</short> This tag takes    the same attributes as <xref href='gtext.tag' />.</p>    -  <ex type=vert> +  <ex>    <anfang crop=\"\">This is a beginning<br />    of a very short text,<br />    and here it ends.
436: Inside #if defined(manual)
   default the alt attribute will be set to the contents of the    <tag>gtext</tag> tag.</p>    -  <ex type=vert> +  <ex>    <gtext fgcolor=\"blue\" alt=\"Hello!\">Welcome!</gtext>    </ex>   </attr>
444: Inside #if defined(manual)
  <attr name='border' value='width,color'><p>    Draws a border around the text of the specified width and color.</p>    -  <ex type=vert> +  <ex>   <gtext fgcolor=\"blue\" border=\"2,red\">Red border</gtext>    </ex>   </attr>
460: Inside #if defined(manual)
   will highlight the image when the mouse is moved over it. The message    is shown in the browser's status bar.</p>    -  <ex type=vert> +  <ex>   <gtext href=\"\" magic=\"Roxen\"></gtext>    </ex>   </attr>
469: Inside #if defined(manual)
   Same as for any <tag>gtext</tag> attribute, except for the    highlighted image.</p>    - <ex type=vert><gtext fgcolor=\"blue\" magic=\"\" + <ex><gtext fgcolor=\"blue\" magic=\"\"   magic-glow=\"red\" magic-fg=\"white\">Mouse me!</gtext></ex>   </attr>   
482: Inside #if defined(manual)
   writing a large text, and word wrap at the edges of the display is    desired.</p>    - <ex type='vert'> + <ex>    <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.
494: Inside #if defined(manual)
   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=\"\">One image per character.</gtext></ex> +  <ex><gtext scale=\"0.4\" split=\"\">One image per character.</gtext></ex>   </attr>      <attr name='submit'><p>