home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Graphics
/
Graphics.zip
/
graph2.zip
/
testGr1.cpp
< prev
next >
Wrap
Text File
|
1996-09-25
|
819b
|
47 lines
#include <stdio.h>
#include "graph2.h"
void Func()
{
__GrInit(1);
__GrSetPalEntry(0x01,000,0,255);
__GrSetPalEntry(0x02,255,0,255);
__GrSetColor(1);
for (int y=0;y<480;y+=5) {
__GrLine(0,y,639,y);
}
for (int x=0;x<640;x+=5) {
__GrLine(x,0,x,479);
} /* endfor */
__GrSetColor(2);
__GrRectl(0,0,639,479);
__GrRectl(2,2,637,477);
__GrSetColor(1);
__GrRectl(1,1,638,478);
__GrSetColor(2);
fgetc(stdin);
for (int y=0;y<256;y++) {
__GrSetColor(y);
__GrLine(0,y,639,y);
}
// fgetc(stdin);
__GrSetColor(0x01);
__GrCircle(200,200,100);
__GrRectl(80,80,400,400);
__GrSetColor(0xff/2);
__GrFillRectl(600,0,639,479);
fgetc(stdin);
for (unsigned x=0;x<__GrPtr->colors;x++) {
__GrSetPalEntry(x,x,x,x);
}
__GrTerm();
}
int main()
{
Func();
// Func();
return 0;
}