wmii/img/mkfile

38 lines
871 B
Plaintext
Raw Normal View History

2007-05-10 22:30:22 +04:00
MKSHELL=rc
path=$PLAN9/bin $path
eps = wmii.eps
epsbox = `{sed -n '/^%%BoundingBox:/{s/.*://p; q;}' $eps}
2008-05-20 03:26:43 +04:00
iconwidth = 154
2007-05-10 22:30:22 +04:00
iconscale = `{*=$epsbox; hoc -e $iconwidth/'('$3-' '$1')'}
iconheight = `{*=$epsbox; hoc -e '('$4-' '$2')*'$iconscale}
2008-02-03 23:06:26 +03:00
%.png: %.eps
* = `{hoc -e'-('$epsbox')'}
x = $1
y = $2
2008-05-20 03:26:43 +04:00
gs -q -dBATCH -dNOPAUSE -s'DEVICE=pngalpha' -s'OutputFile='$target -g$iconwidth'x'$iconheight - <<!
2008-02-03 23:06:26 +03:00
$iconscale $iconscale scale
$x $y translate
($eps) run
showpage
quit
!
%-small.png: %.eps
iconwidth = 16
iconscale = `{*=$epsbox; hoc -e $iconwidth/'('$3-' '$1')'}
iconheight = `{*=$epsbox; hoc -e '('$4-' '$2')*'$iconscale}
2008-01-18 23:05:45 +03:00
* = `{hoc -e'-('$epsbox')'}
x = $1
y = $2
2008-05-20 03:26:43 +04:00
gs -q -dBATCH -dNOPAUSE -s'DEVICE=pngalpha' -s'OutputFile='$target -g$iconwidth'x'$iconheight - <<!
2007-05-10 22:30:22 +04:00
$iconscale $iconscale scale
$x $y translate
($eps) run
showpage
quit
!