Help for this page

Select Code to Download


  1. or download this
    use GD;
    my $img = new GD::Image ($width, $height);
    ...
      $img->filledPolygon ($polygon,$white);
    } @polygons;
    print $img->png ();
    
  2. or download this
    use Imager;
    my $img = Imager->new (xsize=>$width, ysize=>$height,
    ...
      $img->polygon (points=>\@polygon, color=>'white');
    } @polygons;
    $img->write (fd => fileno(STDOUT), type=>'png');