summaryrefslogtreecommitdiffhomepage
path: root/icons/gen-load-icons.sh
diff options
context:
space:
mode:
Diffstat (limited to 'icons/gen-load-icons.sh')
-rwxr-xr-xicons/gen-load-icons.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/icons/gen-load-icons.sh b/icons/gen-load-icons.sh
new file mode 100755
index 0000000..2ff765e
--- /dev/null
+++ b/icons/gen-load-icons.sh
@@ -0,0 +1,36 @@
+#! /usr/bin/env perl
+
+use warnings;
+use strict;
+
+use local::lib;
+use Image::Xpm;
+use POSIX;
+
+my $iwidth = 8;
+my $iheight = 16;
+my $pixels_per = $iheight / 8;
+my $color_bg = "white";
+my $color_fg = "darkseagreen";
+
+for ( my $file_num = 0; $file_num <= 8; $file_num++ ) {
+ my $i = Image::Xpm->new(-file => "load_$file_num.xpm",
+ -width => $iwidth,
+ -height => $iheight,
+ -background => $color_bg);
+
+ my $h = $file_num * $pixels_per;
+
+ for ( my $x = 0; $x < $iwidth; $x++ ) {
+ for ( my $y = 0; $y < $iheight; $y++ ) {
+ $i->xy($x, $y, $color_bg);
+ }
+ }
+ for ( my $x = 0; $x < $iwidth; $x++ ) {
+ for ( my $y = $iheight; $y >= ($iheight - $h); $y-- ) {
+ $i->xy($x, $y, $color_fg);
+ }
+ }
+
+ $i->save;
+}