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>pieslice() draw a pieslice</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 pieslice()              Draw a Pieslice

 #include   <graphics.h>

 void far   pieslice(x,y,stangle,endangle,radius);
 int        x;
 int        y;
 int        stangle, endangle;
 int        radius;

    pieslice() draws a pieslice shape with the center at ('x','y') and
    with a radius 'radius'. The slice starts at 'stangle' and goes
    counterclockwise toward 'endangle'. 0 degrees is at 3 o'clock and 90
    degrees is at 12 o'clock.

    Returns:    Nothing.  If coded, graphresult() will return -6 (out of
                memory in scan fill) if an error occurs while filling the
                pieslice.

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

    The following statements draw a pieslice 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);
               pieslice(100,100,0,134,49);
               getch();
               closegraph();
           }


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

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