Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.73 1997/09/17 00:44:09 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.74 1997/09/19 16:28:28 js Exp $";   constant thread_safe=1;      #include <module.h>   inherit "module";   inherit "roxenlib";      #if efun(_static_modules)   # define map_array Array.map   import Image;   # define Image image
Roxen.git/server/modules/graphics/graphic_text.pike:46:    " 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" +  " alt=message Sets the 'alt' attribute.\n" +  " Use alt="" if no alternate message is wanted.\n"    " quant=cols Use this number of colors\n"    " magic[=message] Modifier to href, more flashy links\n"    " Does <b>not</b> work with 'split'\n"    " fuzz[=color] Apply the 'glow' effect to the result\n"    " fs Use floyd-steinberg dithering\n"    " border=int,col. Draw an border (width is the first argument\n"    " in the specified color\n"    " spacing=int Add this amount of spacing around the text\n"    " xspacing=int like spacing, but only horizontal\n"    " yspacing=int like spacing, but only vertical\n"
Roxen.git/server/modules/graphics/graphic_text.pike:922:   }         string magic_image(string url, int xs, int ys, string sn,    string image_1, string image_2, string alt,    string mess,object id,string input,string extra_args)   {    if(!id->supports->images) return alt;    if(!id->supports->javascript)    return (!input)? -  ("<a "+extra_args+"href=\""+url+"\"><img _parsed=1 src=\""+image_1+"\" name="+sn+" border=0 alt=\""+alt+"\" ></a>\n"): +  ("<a "+extra_args+"href=\""+url+"\"><img _parsed=1 src=\""+image_1+"\" name="+sn+" border=0 "+ +  "alt=\""+alt+"\"></a>\n"):    ("<input type=image "+extra_args+" src=\""+image_1+"\" name="+input+">");       return    ("<script>\n"    " "+sn+"l = new Image("+xs+", "+ys+");"+sn+"l.src = \""+image_1+"\";\n"    " "+sn+"h = new Image("+xs+", "+ys+");"+sn+"h.src = \""+image_2+"\";\n"    "</script>\n"+    ("<a "+extra_args+"href=\""+url+"\" "+    (input?"onClick='document.forms[0].submit();' ":"")    +"onMouseover=\"img_act('"+sn+"',"+sn+"h,'"+(mess||url)+"');\"\n"
Roxen.git/server/modules/graphics/graphic_text.pike:1164:    int num2 = find_or_insert(arg);    array size = write_text(num2,gt,1,id);       if(!defines->magic_java) res = magic_javascript_header(id);    defines->magic_java="yes";       return res +    magic_image(url||"", size[0], size[1], "i"+(defines->mi++),    query_location()+num+"/"+quote(gt),    query_location()+num2+"/"+quote(gt), -  replace(gt, "\"","'"),(magic=="magic"?0:magic), +  (arg->alt?arg->alt:replace(gt, "\"","'")), +  (magic=="magic"?0:magic),    id,input?na||"submit":0,ea);    }    if(input)    return (pre+"<input type=image name=\""+na+"\" border=0 alt=\""+ -  replace(gt,"\"","'")+"\" src="+query_location()+num+"/"+quote(gt) +  (arg->alt?arg->alt:replace(gt,"\"","'"))+ +  "\" src="+query_location()+num+"/"+quote(gt)    +" align="+(al || defalign)+ea+    " width="+size[0]+" height="+size[1]+">"+rest+post);    return (pre+(lp?lp:"")+ -  "<img _parsed=1 border=0 alt=\""+replace(gt,"\"","'")+"\" src=\""+ +  "<img _parsed=1 border=0 alt=\""+ +  (arg->alt?arg->alt:replace(gt,"\"","'")+"\"") +  +"\" src=\""+    query_location()+num+"/"+quote(gt)+"\" "+ea    +" align="+(al || defalign)+    " width="+size[0]+" height="+size[1]+">"+rest+(lp?"</a>":"")+post);   }      inline string ns_color(array (int) col)   {    if(!arrayp(col)||sizeof(col)!=3)    return "#000000";    return sprintf("#%02x%02x%02x", col[0],col[1],col[2]);