#!/bin/sh
# Take screen shots of "piczat" printing in nine positions of h&valign with the x= and y= offsets
#usage: align.sh [x= NUM] [y= NUM]

cd /mnt/us/piczat
#expects PATH=$PATH:.:..

x=0;y=0

while [ "$1" != '' ]; do #parse parameters, no validation!
  case "$1" in
   x=) shift;x=$1;shift;;
   y=) shift;y=$1;shift;;
  esac
done

fbink -c -B GRAYB ''

piczat -T 1 -S 6 halign= LEFT   valign= TOP x= $x y= $y
piczat -T 2 -S 6 halign= MIDDLE   valign= TOP x= $x y= $y
piczat -T 3 -S 6 halign= RIGHT   valign= TOP x= $x y= $y
piczat -T 4 -S 6 halign= LEFT   valign= MIDDLE x= $x y= $y
piczat -T 5 -S 6 halign= MIDDLE   valign= MIDDLE x= $x y= $y
piczat -T 6 -S 6 halign= RIGHT   valign= MIDDLE x= $x y= $y
piczat -T 7 -S 6 halign= LEFT   valign= BOTTOM x= $x y= $y
piczat -T 8 -S 6 halign= MIDDLE   valign= BOTTOM x= $x y= $y
piczat -T 9 -S 6 halign= RIGHT   valign= BOTTOM x= $x y= $y
screenshot
