Purpose: This script was written to create the lowerleft quarter circle of the main navigation bar on the site. It should be no surprise I wrote 3 more scripts generate the 3 other circle parts. I chose scripting these pictures over drawing them manually out of consciousness of my own lack of drawing skills.
Requirements: The GNU Image Manipulation Program, aka the GIMP and Perl
Output:
#!/usr/bin/perl -w
use Gimp qw( :auto );
use Gimp::Fu;
#Gimp::set_trace(TRACE_CALL);
sub website_quarter_circle_ll {
my $width=8;
my $height=$width;
my ($image,$layer);
my $circle_color = [187,221,255];
my $webpage_color = [255,255,255];
gimp_palette_set_background($circle_color);
$image = gimp_image_new($width, $height, RGB);
$layer = gimp_layer_new($image, $width, $height, RGBA_IMAGE, "Button", 100, NORMAL_MODE);
gimp_image_add_layer($image, $layer, 0);
gimp_edit_clear($layer);
gimp_ellipse_select($image,-0*$height, -1*$width, $width*2, $height*2, 0, 1, 0, 0.5);
gimp_bucket_fill($layer, BG_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 5, 5);
gimp_selection_invert($image);
gimp_palette_set_background($webpage_color);
gimp_bucket_fill($layer, BG_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 5, 5);
gimp_selection_none($image);
gimp_convert_indexed($image, 0, 0, 8,0,0, "");
return $image;
}
register
"website_quarter_circle_ll", # fill in name
"Create Website Toolbar lowerleft corner button", # a small description
"A script to create a quarter circle in Gimp", # a help text
"Frederik Vanrenterghem", # Your name
"", # Your copyright
"2002-10-21", # Date
"<Toolbox>/Xtns/Perl-Fu/Website/CreateQuarterCircleLL", # menu path
"*", # Image types
[
],
\&website_quarter_circle_ll;
exit main()
|