mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 23:52:49 +02:00
tstimg.c: completed the alphabet
- tstimg.c (printc): added diagonal to '0' (zero) to distinguish it from 'O' (oh) - tstimg.c (printc): added "nose" to '1' to better distinguish it from 'I' - tstimg.c (printc): completed the alphabet - tstimg.c (printc): added '.' character
This commit is contained in:
parent
9fb5c6f3f4
commit
7d16a0682d
131
ubb-vga/tstimg.c
131
ubb-vga/tstimg.c
@ -201,8 +201,10 @@ static void printc(void **f, int xres, int x, int y, char c, int n,
|
||||
line45(f, xres, x, y+n, 0, 1, 2*n, color, side);
|
||||
line45(f, xres, x+2*n, y+n, 0, 1, 2*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
line45(f, xres, x, y+3*n, 1, -1, 2*n, color, side);
|
||||
break;
|
||||
case '1':
|
||||
line45(f, xres, x, y+n, 1, -1, n, color, side);
|
||||
line45(f, xres, x+n, y, 0, 1, 4*n, color, side);
|
||||
break;
|
||||
case '2':
|
||||
@ -267,6 +269,30 @@ static void printc(void **f, int xres, int x, int y, char c, int n,
|
||||
line45(f, xres, x, y+4*n, 1, 0, n, color, side);
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
break;
|
||||
case 'C':
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x, y+n, 0, 1, 2*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
break;
|
||||
case 'D':
|
||||
arc(f, xres, x+n, y+n, n, 1, color, side);
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x+2*n, y+n, 0, 1, 3*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, 0, n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 2, color, side);
|
||||
break;
|
||||
case 'E':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'F':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'G':
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x, y+n, 0, 1, 2*n, color, side);
|
||||
@ -274,6 +300,78 @@ static void printc(void **f, int xres, int x, int y, char c, int n,
|
||||
line45(f, xres, x+n, y+2*n, 1, 0, n, color, side);
|
||||
line45(f, xres, x+2*n, y+2*n, 0, 1, n, color, side);
|
||||
break;
|
||||
case 'H':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'I':
|
||||
line45(f, xres, x+n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'J':
|
||||
line45(f, xres, x+2*n, y, 0, 1, 3*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
break;
|
||||
case 'K':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, -1, 2*n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 1, 2*n, color, side);
|
||||
break;
|
||||
case 'L':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'M':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 1, n, color, side);
|
||||
line45(f, xres, x+n, y+n, 1, -1, n, color, side);
|
||||
line45(f, xres, x+n, y+1*n, 0, 1, n, color, side);
|
||||
break;
|
||||
case 'N':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 1, n, color, side);
|
||||
line45(f, xres, x+n, y+n, 0, 1, 2*n, color, side);
|
||||
line45(f, xres, x+n, y+3*n, 1, 1, n, color, side);
|
||||
break;
|
||||
case 'O':
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x, y+n, 0, 1, 2*n, color, side);
|
||||
line45(f, xres, x+2*n, y+n, 0, 1, 2*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
break;
|
||||
case 'P':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 0, n, color, side);
|
||||
arc(f, xres, x+n, y+n, n, 3, color, side);
|
||||
break;
|
||||
case 'Q':
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x, y+n, 0, 1, 2*n, color, side);
|
||||
line45(f, xres, x+2*n, y+n, 0, 1, 2*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
line45(f, xres, x+n, y+3*n, 1, 1, n, color, side);
|
||||
break;
|
||||
case 'R':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, n, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 0, n, color, side);
|
||||
arc(f, xres, x+n, y+n, n, 3, color, side);
|
||||
line45(f, xres, x, y+2*n, 1, 1, 2*n, color, side);
|
||||
break;
|
||||
case 'S':
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x, y+n, 1, 1, 2*n, color, side);
|
||||
arc(f, xres, x+n, y+3*n, n, 6, color, side);
|
||||
break;
|
||||
case 'T':
|
||||
line45(f, xres, x+n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case 'U':
|
||||
line45(f, xres, x, y, 0, 1, 3*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, 3*n, color, side);
|
||||
@ -285,11 +383,43 @@ static void printc(void **f, int xres, int x, int y, char c, int n,
|
||||
line45(f, xres, x+n, y+4*n, 1, -1, n, color, side);
|
||||
line45(f, xres, x+n, y+4*n, -1, -1, n, color, side);
|
||||
break;
|
||||
case 'W':
|
||||
line45(f, xres, x, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, 4*n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, -1, n, color, side);
|
||||
line45(f, xres, x+n, y+3*n, 1, 1, n, color, side);
|
||||
line45(f, xres, x+n, y+2*n, 0, 1, n, color, side);
|
||||
break;
|
||||
case 'X':
|
||||
line45(f, xres, x, y+n, 1, 1, 2*n, color, side);
|
||||
line45(f, xres, x, y+3*n, 1, -1, 2*n, color, side);
|
||||
line45(f, xres, x, y, 0, 1, n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, n, color, side);
|
||||
line45(f, xres, x, y+3*n, 0, 1, n, color, side);
|
||||
line45(f, xres, x+2*n, y+3*n, 0, 1, n, color, side);
|
||||
break;
|
||||
case 'Y':
|
||||
line45(f, xres, x, y, 0, 1, n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, n, color, side);
|
||||
line45(f, xres, x, y+n, 1, 1, n, color, side);
|
||||
line45(f, xres, x+2*n, y+n, -1, 1, n, color, side);
|
||||
line45(f, xres, x+n, y+2*n, 0, 1, 2*n, color, side);
|
||||
break;
|
||||
case 'Z':
|
||||
line45(f, xres, x, y, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x, y+4*n, 1, 0, 2*n, color, side);
|
||||
line45(f, xres, x+2*n, y, 0, 1, n, color, side);
|
||||
line45(f, xres, x, y+3*n, 0, 1, n, color, side);
|
||||
line45(f, xres, x, y+3*n, 1, -1, 2*n, color, side);
|
||||
break;
|
||||
case '-':
|
||||
line45(f, xres, x, y+2*n, 1, 0, 2*n, color, side);
|
||||
break;
|
||||
case ' ':
|
||||
break;
|
||||
case '.':
|
||||
line45(f, xres, x+n, y+3*n, 0, 1, n, color, side);
|
||||
break;
|
||||
default:
|
||||
arc(f, xres, x+n, y+n, n, 9, color, side);
|
||||
line45(f, xres, x+n, y+2*n, 1, -1, n, color, side);
|
||||
@ -328,6 +458,7 @@ void tstimg(void **f, int xres, int yres)
|
||||
grid(f, xres, yres);
|
||||
sides(f, xres, yres);
|
||||
color_bars(f, xres, yres);
|
||||
|
||||
sprintf(buf, "UBB-VGA %dx%d", xres, yres);
|
||||
ctext(f, xres, xres/2, yres/2-GRID*0.75, buf, 10, WHITE, 3);
|
||||
ctext(f, xres, xres/2, yres*(CBAR_Y0+CBAR_Y1)/2, buf, 2, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user