/usr/share/doc/libgd-gd2-perl/examples/demos/fills.pl is in libgd-gd2-perl 1:2.46-3.1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/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;
|