#!/usr/bin/perl -w use Image::Button::Rect; use Image::Button::Plain; use Image::Button::Set; my $textcolor = [0, 0, 0]; my $linkcolor = [0, 0, hex(99)]; my $tst = new Image::Button::Plain(text => 'twostones.org', font => 'courbd.ttf', fontsize => 25, fgcolor => $textcolor, file => 'tst.png'); $tst->print; $tst = new Image::Button::Plain(text => 'twostones.org', font => 'courbd.ttf', fontsize => 25, fgcolor => $linkcolor, file => 'tst-b.png'); $tst->print; my $art = new Image::Button::Rect(text => 'articles', font => 'courbd.ttf', fontsize => 12, fgcolor => $linkcolor, btcolor => [240, 240, 240]); my $btlist = ['guests', 'invitados', 'software', 'support', 'search', 'whoami', 'quiensoy', 'contents', 'contenido', 'books', 'libros', 'articles', 'artículos', 'apuntes', 'notes', 'stones', 'piedras']; my $set = new Image::Button::Set(button => $art, textlist => $btlist); $set->flush(sameWidth => 1, sameHeight => 1); push @$btlist, 'science', 'zen', 'economics', 'economía', 'What Is This Cheese For', 'About the Century', 'Fin de siglo', 'The Monster Is Us', 'Terrorismo y espionaje', 'Lemmings', 'Introduction to XML', 'Apology Shell', 'yads', 'yads manual'; $set->push(button => new Image::Button::Plain(text => 'articles', font => 'courbd.ttf', fontsize => 12, fgcolor => $textcolor, btcolor => [255, 255, 255]), textlist => $btlist); $set->print(prefix => 'p-'); $set->print(prefix => 'p-', postfix => '-b', override => { fgcolor => $linkcolor });