@ -0,0 +1,68 @@ |
||||
#!/bin/bash |
||||
|
||||
line[0]=$1 |
||||
line[1]=$2 |
||||
|
||||
COLOR="green" |
||||
IMG_PATH="./images" |
||||
CHAR_PATH="${IMG_PATH}/LCD_characters_${COLOR}" |
||||
|
||||
if [ ! -e ${IMG_PATH} ] |
||||
then |
||||
echo "Cannot find path for images \"${IMG_PATH}\"" |
||||
exit 10 |
||||
fi |
||||
|
||||
if [ ! -e ${CHAR_PATH} ] |
||||
then |
||||
echo "Cannot find path for character-images \"${CHAR_PATH}\"" |
||||
exit 11 |
||||
fi |
||||
|
||||
cp "${IMG_PATH}/LCD_${COLOR}.png" /tmp/LCD_$$.png |
||||
|
||||
special_flag="false" |
||||
for (( n=0; n<2; n++ )) |
||||
do |
||||
y=$( bc -l <<<"50 + $n * 50" ) |
||||
xpos=0 |
||||
for (( i=0; i<${#line[$n]}; i++ )) |
||||
do |
||||
c=${line[${n}]:${i}:1} |
||||
if [[ "${c}" == "%" ]] |
||||
then |
||||
if [[ "${special_flag}" == "false" ]] |
||||
then |
||||
special_flag="true" |
||||
special="" |
||||
continue |
||||
else |
||||
special_flag="false" |
||||
if [ ! -e "${CHAR_PATH}/${special}.png" ] |
||||
then |
||||
echo "Cannot find \"${CHAR_PATH}/${special}.png\"." |
||||
c=" " |
||||
else |
||||
c=${special} |
||||
fi |
||||
fi |
||||
fi |
||||
if [[ "${special_flag}" == "true" ]] |
||||
then |
||||
special="${special}${c}" |
||||
continue |
||||
fi |
||||
xpos=$((xpos + 1)) |
||||
if [[ "${c}" != " " ]] |
||||
then |
||||
if [[ ${c} == "." ]] |
||||
then |
||||
c="dot" |
||||
fi |
||||
x=$( bc -l <<<"230 + ${xpos} * 30" ) |
||||
composite -gravity NorthWest -geometry "+${x}+${y}" "${CHAR_PATH}/${c}.png" /tmp/LCD_$$.png /tmp/LCD_$$.png |
||||
fi |
||||
done |
||||
done |
||||
|
||||
mv /tmp/LCD_$$.png /tmp/LCD.png |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 229 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 208 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 222 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 195 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 180 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 219 B |
@ -0,0 +1 @@ |
||||
blank.png |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 198 B |
@ -0,0 +1 @@ |
||||
block.png |
@ -0,0 +1 @@ |
||||
blank.png |
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 198 B |
@ -0,0 +1 @@ |
||||
block.png |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 205 B |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 210 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 211 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 204 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 207 B |
After Width: | Height: | Size: 212 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 215 B |
After Width: | Height: | Size: 217 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 226 B |