Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_pie() draw a pie-slice shape</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _pie()                  Draw a pie-slice shape

 #include   <graph.h>

 short far _pie( fill, x1, y1, x2, y2, x3, y3, x4, y4 );
  short fill;  Fill selection
  short x1, y1;     Upper-left corner of bounding rectangle
  short x2, y2;     Lower-right corner of bounding rectangle
  short x3, y3;     Start vector
  short x4, y4;     End vector

    _pie() draws a pie-shaped wedge by drawing an elliptical arc whose
    center and two endpoints are joined by lines. The logical points (x1,
    y1) and (x2, y2) define the upper-left and lower-right corners of a
    rectangle enclosing the ellipse that defines the arc. The center of
    the arc is the center of the rectangle. The fill argument can be one
    of the following manifest constants defined in graph.h:

    Constant          Meaning
    --------------    --------------------------------
    _GFILLINTERIOR    Fills the figure with the current
                      color using the current fill mask.
    _GBORDER          Does not fill the figure.

       Returns:     If successful, _pie() returns a nonzero value,
                    otherwise it returns 0.

         Notes:     The pie-shape is drawn using the current color moving
                    in a counterclockwise direction.

   Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                    compatibles

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

    This program draws a filled pie-shape.

           #include <conio.h>
           #include <graph.h>

           main()
           {
              _setvideomode( _MRES4COLOR );
              _pie( _GFILLINTERIOR, 90, 60, 250, 160, 250, 22, 10, 160 );

              while ( !kbhit() );
              _setvideomode( _DEFAULTMODE );
           }


See Also: _ellipse() _rectangle() _setfillmask() _setcolor() _arc()

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