How to drow line using pixel in c code
================================================================
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm,x,y=50;
initgraph(&gd, &gm, "C:\\TC\\BGI");
for(x=50;x<=100;x++)
{
putpixel(x, y,WHITE);
}
getch();
closegraph();
return 0;
}
================================================================
#include<graphics.h>
#include<conio.h>
main()
{
int gd = DETECT, gm,x,y=50;
initgraph(&gd, &gm, "C:\\TC\\BGI");
for(x=50;x<=100;x++)
{
putpixel(x, y,WHITE);
}
getch();
closegraph();
return 0;
}
No comments:
Post a Comment