1 /**
2  ** rgbtest.c ---- show 256 color RGB palette
3  **
4  ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221
5  ** [e-mail: csaba@vuse.vanderbilt.edu]
6  **
7  ** This is a test/demo file of the GRX graphics library.
8  ** You can use GRX test/demo files as you want.
9  **
10  ** The GRX graphics library is free software; you can redistribute it
11  ** and/or modify it under some conditions; see the "copying.grx" file
12  ** for details.
13  **
14  ** This library is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17  **
18  **/
19 
20 #include "test.h"
21 
TESTFUNC(rgbtest)22 TESTFUNC(rgbtest)
23 {
24 	int x = GrSizeX();
25 	int y = GrSizeY();
26 	int ww = (x-10)/32;
27 	int wh = (y-10)/8;
28 	int ii,jj;
29 
30 	GrSetRGBcolorMode();
31 	for(ii = 0; ii < 8; ii++) {
32 	    for(jj = 0; jj < 32; jj++) {
33 		GrFilledBox(5+jj*ww,5+ii*wh,5+jj*ww+ww-1,5+ii*wh+wh-1,ii*32+jj);
34 	    }
35 	}
36 	GrKeyRead();
37 }
38 
39