From 8895ac3c10fbc8174f740946ac35c87eba444262 Mon Sep 17 00:00:00 2001 From: daleclack <63892434+daleclack@users.noreply.github.com> Date: Tue, 15 Sep 2020 20:51:56 +0800 Subject: [PATCH] Add ege1.cpp --- ege/ege1.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ege/ege1.cpp diff --git a/ege/ege1.cpp b/ege/ege1.cpp new file mode 100644 index 0000000..aa22df9 --- /dev/null +++ b/ege/ege1.cpp @@ -0,0 +1,16 @@ +#include +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; +}