#!/bin/sh # # drft06rr_roundbutton - Make round text web buttons # # Makes a large or small -s) round button gif given the text and optional color passed # # Paul Wessel, 20-NOV-2001 if [ $# -eq 0 ];then echo "usage: drft06rr_roundbutton [-f] [-s] txt [] []" >&2 exit fi if [ $1 = "-s" ]; then res=14x14 s=small shift else res=20x20 s= fi if [ $1 = "-f" ]; then force=1 shift else force=0 fi if [ $1 = "-s" ]; then res=14x14 s=small shift else res=20x20 s= fi if [ -f $s$1.gif ] && [ $force -eq 0 ]; then echo "drft06rr_roundbutton: $s$1.gif already exists, use -f to overwrite it" >&2 exit fi if [ $# -ge 2 ]; then rgb=$2 else rgb=255/0/0 fi if [ $# -eq 3 ]; then pen=$3 else pen=255 fi gmtset PAPER_MEDIA letter+ echo "0.5 0.5" | psxy -R0/1/0/1 -Jx1 -P -K -Sc1i -W0.5p -G$rgb > t.ps echo "0.5 0.5 52 0 1 CM $1" | pstext -R -Jx -G$pen -S0.5p -O >> t.ps echo "quit" >> t.ps convert -density $res -crop 0x0 t.ps $s$1.gif echo "Created image $s$1.gif" rm -f t.ps