Add ege1.cpp

This commit is contained in:
daleclack 2020-09-15 20:51:56 +08:00 committed by GitHub
parent 0ab9c64c39
commit 8895ac3c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

16
ege/ege1.cpp Normal file
View File

@ -0,0 +1,16 @@
#include<graphics.h>
int main(){
initgraph(320,240);//Create A Window sized 320x240
setviewport(100,40,240,220,1);//set text area (100,40) to (240,220)
setcolor(EGERGB(0x0,0xFF,0x0));//window color
setfontbkcolor(RGB(0x80,0x00,0x80));//font background color
setfont(17,0,"Simsum");//Set Font
outtextxy(0,0,"Hello EGE Graphics");//output text at specific place
setbkmode(TRANSPARENT);
outtextxy(0,20,"Hello EGE Graphics");//output text at specific place
setviewport(0,0,getwidth(),getheight(),1);//reset text area
outtextxy(0,0,"Hello EGE Graphics");
getch();
closegraph();
return 0;
}