[Bio] / FigWebServices / vert_text.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/vert_text.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : olson 1.2 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : olson 1.1 use GD;
19 :    
20 :     use CGI;
21 :    
22 :     $cgi = new CGI;
23 :    
24 :     $f = gdLargeFont;
25 :     $str = $cgi->param("str");
26 :    
27 :     $w = $f->height;
28 :     $h = $f->width * length($str);
29 :    
30 :     $im = new GD::Image($w + 4, $h + 4);
31 :    
32 :     $black = $im->colorAllocate(0, 0, 0);
33 :     $white = $im->colorAllocate(255, 255, 255);
34 :    
35 :     $im->fill(0, 0, $white);
36 :     $im->stringUp($f, 2 , $h + 2, $str, $black);
37 :    
38 :     print "Content-type: image/png\n";
39 :     print "\n";
40 :    
41 :     print $im->png;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3