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.254 2000/12/30 07:21:15 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.255 2000/12/31 23:57:05 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:336: Inside #if defined(manual)
  // Sets the padding between characters.   // <ex type=vert>   // <gtext xpad=\"-30%\" scale=\"0.6\">&lt;gtext xpad=-30%&gt;</gtext><br />   // <gtext xpad=\"-10%\" scale=\"0.6\">&lt;gtext xpad=-10%&gt;</gtext><br />   // <gtext scale=\"0.6\">&lt;gtext&gt;</gtext><br />   // <gtext xpad=\"10%\" scale=\"0.6\">&lt;gtext xpad=10%&gt;</gtext><br />   // <gtext xpad=\"30%\" scale=\"0.6\">&lt;gtext xpad=30%&gt;</gtext><br />   // </ex>   // </attr>   // At least temporarily removed from the documentation - #" +     -  + +#" +    <attr name=xsize value=number>    Sets the width.   </attr>      <attr name=xspacing value=number>    Sets the horizontal spacing.   </attr>      <attr name=ypad value=percentage>    Sets the padding beteen lines.   </attr>    -  +    <attr name=ysize value=number>    Sets the height.   </attr>      <attr name=yspacing value=number>    Sets the vertical spacing.   </attr>";         constant tagdoc=([
Roxen.git/server/modules/graphics/graphic_text.pike:585:    if( args->afont )    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; +  int|float xpad=1.0; +  if(args->xpad) +  if(args->xpad[-1]=='%') +  xpad = (float)args->xpad; +  else +  xpad = (int)args->xpad; +  int|float ypad=1.0; +  if(args->ypad) +  if(args->ypad[-1]=='%') +  ypad = (float)args->ypad; +  else +  ypad = (int)args->ypad;    font = get_font(args->font||"default",    (int)args["fontsize"]||32,    bold,    italic,    lower_case(args->talign||"left"), -  (float)args->xpad, -  (float)args->ypad); +  xpad, +  ypad);    }    if(!font)    font = resolve_font(0);       if (!font)    error("gtext: No font (tried "+    (args->afont||args->font||args->nfont)+ ")!\n");       // Fonts and such are now initialized.    [img, Image.Image alpha] = GText.make_text_image(args, font, text, id);