/usr/share/doc/perl-GD/demos
NameSizeModeActions
brushes.pl9230755editdlrm
copies.pl10910755editdlrm
draw_colors.pl9440755editdlrm
fills.pl5900755editdlrm
fonttest9360755editdlrm
font_list.png220780644editdlrm
gd_example.cgi6830755editdlrm
png2jpeg.pl5630644editdlrm
polyline.pl88480644editdlrm
polys.pl7850755editdlrm
shapes.pl12930755editdlrm
tile.png2800644editdlrm
transform.pl10130755editdlrm
truetype_test8640755editdlrm
ttf.pl7360755editdlrm
Edit: /usr/share/doc/perl-GD/demos/fills.pl (590B)
#!/usr/bin/perl use GD; $im = new GD::Image(100,50); # allocate black -- this will be our background $black = $im->colorAllocate(0, 0, 0); # allocate white $white = $im->colorAllocate(255, 255, 255); # allocate red $red = $im->colorAllocate(255, 0, 0); # allocate blue $blue = $im->colorAllocate(0,0,255); #Inscribe an ellipse in the image $im->arc(50, 25, 98, 48, 0, 360, $white); # Flood-fill the ellipse. Fill color is red, and will replace the # black interior of the ellipse $im->fill(50, 21, $red); binmode STDOUT; # print the image to stdout print $im->png;