Sunday, 31 March 2013
Simple Line Drawing In Turbo C Graphics
Well this post consists of the source code for very very simple line drawing using the in-built functions.
I hope it proves useful for learning purpose.
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
int main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "C:\\TurboC3\\BGI");
line(100, 100, 350, 100);
line(100, 100, 70, 140);
line(70, 140, 130, 140);
line(350, 100, 380, 140);
rectangle(70, 140, 130, 200);
rectangle(130, 140, 380, 200);
getch();
closegraph();
return 0;
}
I hope it proves useful for learning purpose.
Labels:
c,
C/C++,
programming
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Simple Line Drawing In Turbo C Graphics
2013-03-31T23:00:00+05:45
Cool Samar
c|C/C++|programming|
Subscribe to:
Post Comments (Atom)