Wednesday, April 14, 2021

, , , ,

line function in computer graphics

line function in c programming :-

Well line function in c computer graphics is used as it name says to draw a line from a point(x1,y1) to point(x2,y2) where (x2,y2) are end points to draw a line.

Here you can also check the c program to draw a line in computer graphics.

 C example program

 #include <graphics.h>
#include <conio.h>

main()
{
   int gd = DETECT, gm;

   initgraph(&gd, &gm, "C:\\TC\\BGI");

   line(100, 100, 200, 200);

   getch();
   closegraph();
   return 0;
}

0 comments:

Post a Comment