fly: Documentation: Examples
If you are using fly from within a CGI program, here are some examples:
If you use perl, you should really use Lincoln Stein's GD.pm.
#!/usr/local/bin/perl $flyprog = "/usr/local/bin/fly"; $outfile = "temp.gif"; open(FLY,"| $flyprog -o $outfile "); print FLY "new\n"; print FLY "size 256,256\n"; print FLY "fill 1,1,255,255,255\n"; print FLY "circle 128,128,180,0,0,0\n"; print FLY "fill 128,128,255,255,0\n"; print FLY "arc 128,128,120,120,0,180,0,0,0\n"; print FLY "circle 96,96,10,0,0,0\n"; print FLY "circle 160,96,10,0,0,0\n"; print FLY "fill 96,96,0,0,0\n"; print FLY "fill 160,96,0,0,0\n"; close(FLY);
#!/bin/csh # test out fly! cat > /tmp/fly.$$ <<EOD new size 256,256 fill 1,1,255,255,255 circle 128,128,180,0,0,0 fill 128,128,255,255,0 arc 128,128,120,120,0,180,0,0,0 circle 96,96,10,0,0,0 circle 160,96,10,0,0,0 fill 96,96,0,0,0 fill 160,96,0,0,0 EOD fly -i /tmp/fly.$$ -o test.gif
You can even create your own fly "scripts"!
#!/usr/local/bin/fly -q new size 256,256 fill 1,1,255,255,255 <etc>
Thanks to Andrew Finkenstadt <firstname.lastname@example.org> for noting this unintentional feature of fly.
Can you guess what the above examples produce? Here's the answer!
I have created a Fly Tester CGI program that lets you test fly commands quickly in a convenient interface. The program is also included in the fly distribution.
Created: 21 June 1995 Last modified: 7 September 1999 Access: Unrestricted. Copyright © 1994-1999 Martin Gleeson and The University of Melbourne. <URL:http://www.unimelb.edu.au/fly/>
|Martin Gleeson, email@example.com|