#!/usr/bin/perl
use GD;
use CGI::Carp qw(fatalsToBrowser);
$im = new GD::Image(400,150);
$hintergrund = $im->colorAllocate(255,255,255);
$linienfarbe = $im->colorAllocate(186,221,148);
$textcolor = $im->colorAllocate(0,0,0);
print "Content-Type: Image/JPEG\n\n";
$im->string(gdLargeFont,100,20,"Juni",$textcolor);
$im->string(gdLargeFont,200,20,"Juli",$textcolor);
$im->string(gdLargeFont,300,20,"August",$textcolor);
$im->string(gdLargeFont,10,40,"100%",$textcolor);
$im->string(gdLargeFont,10,80,"50%",$textcolor);
$im->string(gdLargeFont,10,120,"0%",$textcolor);
@array = (1,2,50,40);
$poly = new GD::Polygon;
for (@array) {
$poly->addPt($old, $_);
$old = $_;
}
$im->polygon($poly,$linienfarbe);
print $im->jpeg;