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>

   int gd = DETECT, gm;

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

   line(100, 100, 200, 200);

   return 0;


Post a Comment