Draw A Line With Graphics.h In Dev C++
line(int x1,int y1,int x2,int y2).....
A(x1,y1) Is a 1st point On BGI window
B(x2,y2) Is a 2nd Point On BGI wndow.
And Line Means To Draw Line By Meet Points A and B....
#include<conio.h>
#include<graphics.h>
int main()
{
int gd=DETECT,gm;
initgraph(&gd, &gm, "C\\TC\\BGI");
line(200,200,400,400);
getch();
closegraph;
}
No comments:
Post a Comment