Graphics in c++


#include < iostream.h >
#include < graphics.h >
#include < conio.h >
#include < stdlib.h >
#include < stdio.hn >
void main()
{
 int g_dr,g_mode;
 int x, y;
 g_dr=DETECT;
 if(g_dr<0) cout << " No graphics Adapter\n ";
 cout << "g_dr: " << g_dr << "g_mode: " << g_mode;
 initgraph(&g_dr, &g_mode, "D:/tc11-11-/BGI");
x=getmaxx()/2;
y=getmaxy()/2;
setcolor(RED);
setlinestyle(SOLID_LINE,0,NORM_WIDTH);
rectangle(0,5,635,165);
circle(x,y,100);
setfillstyle(WIDE_DOT_FILL,1);
floodfill(50,50,RED);
setfillstyle(SLASH_FILL,3);
floodfill(x,y,RED);
settextstyle(GOTHIC_FONT,HORIZ_DIR,6);
outtextxy(50,50,"SIEM RIEP");
settextstyle(SANS_SERIF_FONT,VERT_DIR,5);
outtext("MSc-Computer Science");
getch();
cleardevice();
moveto(getmaxx()/2,getmaxy()/2);
settextjustify(CENTER_TEXT,CENTER_TEXT);
setcolor(YELLOW);
outtext("My Frineds ");
getch();
closegraph();
}
<< GO BACK

Our aim is to provide information to the knowledge seekers.


comments powered by Disqus




Footer1