You are here

sector function in c

Sector function draws and fills an elliptical pie slice.

Declaration: void sector( int x, int y, int stangle, int endangle, int xradius, int yradius);

C programming code for sector

  1. #include <graphics.h>
  2. #include <conio.h>
  3.  
  4. main()
  5. {
  6.    int gd = DETECT, gm;
  7.  
  8.    initgraph(&gd, &gm, "C:\\TC\\BGI");
  9.  
  10.    sector(100, 100, 0, 135, 25, 35);
  11.  
  12.    getch();
  13.    closegraph();
  14.    return 0;
  15. }