Bar Function - Computer Graphics CG Program

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

main()
{
   int gd = DETECT, gm;

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

   bar(100, 100, 200, 200);

   getch();
   closegraph();
   return 0;
}
Declaration :- void bar(int left, int top, int right, int base);

Bar capacity is utilized to draw a 2-dimensional, rectangular filled in bar . Directions of left top and right bottom corner are obliged to draw the bar. Left tags the X-direction of upper left corner, top details the Y-direction of upper left corner, right determines the X-direction of right bottom corner, lowest part points out the Y-direction of right base corner. Current fill example and fill color is utilized to fill the bar. To change fill example and fill shade use set fill-style.


Post a Comment

2 Comments