#!/bin/sh WIDTH=15 BLUR=4.5,8 draw() { white=$1 w=$2 convert -size 152x152 xc:$white -matte -fill none -draw "matte 0,0 reset" -channel a \ +fill -stroke $white \ -draw "stroke-antialias 1 stroke-width $WIDTH circle 75.5,75.5 35.75,75" \ -blur $BLUR \ circle-$w.png convert -size 152x152 xc:$white -matte -fill none -draw "matte 0,0 reset" -channel a \ +fill -stroke $white \ -draw "stroke-antialias 1 stroke-width $WIDTH roundrectangle 37.5,37.5 113.5,113.5 8,8" \ -blur $BLUR \ square-$w.png convert -size 152x152 xc:$white -matte -fill none -draw "matte 0,0 reset" -channel a \ +fill -stroke $white \ -draw "stroke-antialias 1 stroke-width $WIDTH line 40,40 111,111 line 111,40 40,111" \ -blur $BLUR \ cross-$w.png R=46 A=$(perl -e "print 75.5-$R") B=$(perl -e "print 75.5 + $R * sin 120/360*4*atan2 1,1") C=$(perl -e "print 75.5 - $R * sin 120/360*4*atan2 1,1") D=$(perl -e "print 75.5 + $R * 0.5") convert -size 152x152 xc:$white -matte -fill none -draw "matte 0,0 reset" -channel a \ +fill -stroke $white \ -draw "stroke-antialias 1 stroke-width $WIDTH polygon 75.5,$A $B,$D $C,$D" \ -blur $BLUR \ triangle-$w.png } draw white w draw black b optipng -q -o9 circle* square* cross* triangle*