/** ** polytest.c ---- test polygon rendering ** ** Copyright (c) 1995 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221 ** [e-mail: csaba@vuse.vanderbilt.edu] ** ** This is a test/demo file of the GRX graphics library. ** You can use GRX test/demo files as you want. ** ** The GRX graphics library is free software; you can redistribute it ** and/or modify it under some conditions; see the "copying.grx" file ** for details. ** ** This library is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** **/ #include #include #include "test.h" static GrColor *EGA; #define black EGA[0] #define red EGA[12] #define blue EGA[1] #define white EGA[15] static void printdata(int n, int points[][2], int convex) { int i, xpos; char buf[41]; if (!convex) sprintf(buf, "Points"); else sprintf(buf, "Convex"); xpos = GrMaxX() - 90; GrTextXY(xpos, 0, buf, white, black); for (i=0; i