Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>sector() draw an elliptical sector</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 sector()                Draw an Elliptical Sector

 #include   <graphics.h>

 void far sector(x, y, stangle, endangle, xradius, yradius);
 int x, y;              Center point
 int stangle,           Starting angle
 int endangle;          Ending angle
 int xradius;           Horizontal radius
 int yradius;           Vertical radius

        This function is the same as pieslice, except that it draws an
        elliptical pie slice. The center point is at (x, y), stangle
        and endangle are the starting and ending angles, the
        horizontal radius is xradius, and the vertical radius is
        yradius.

    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

    The following statements draw a sector filled with red, backslashed
    lines.

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

           int gdriver = DETECT;
           int gmode;

           main()
           {
               struct fillsettingstype saveset;

               initgraph(&gdriver,&gmode,"");
               getfillsettings(&saveset);
               setfillstyle(BKSLASH_FILL,RED);
               sector(100,100,0,134,29, 49);
               getch();
               closegraph();
           }


See Also: arc() circle() ellipse() getarccoords() pieslice()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson