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
$flyprog = "/usr/local/bin/fly";
$outfile = "temp.png";
open(FLY,"| $flyprog -o $outfile ");
print FLY "new\n";
print FLY "size 256,256\n";
print FLY "type png\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";
# test out fly!
cat > /tmp/fly.$$ <<EOD
fly -i /tmp/fly.$$ -o test.jpeg
- Fly Scripts
You can even create your own fly "scripts"!
Thanks to Andrew Finkenstadt <email@example.com> for noting
this unintentional feature of fly.
- If you're using C, then you might as well use gd!!
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 in the
examples directory in the fly distribution.