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

 #include   <graph.h>

 short far _ellipse( fill, x1, y1, x2, y2 );
  short fill;  Fill selection
  short x1, y1;     Upper-left corner
  short x2, y2;     Lower-right corner

    _ellipse() draws an ellipse with the current line style. The logical
    points (x1, y1) and (x2, y2) define the upper-left and lower-right
    corners of a rectangle enclosing the ellipse. The center of the
    ellipse 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 ellipse.

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

         Notes:     If the x and y coordinates define a point (x1 = y1 =
                    y2 = x2) or a horizontal or vertical line (x1 = x2 or
                    y1 = y2) no figure is drawn.

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

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

    This program draws a filled ellipse.

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

           main()
           {
              _setvideomode( _MRES4COLOR );
              _ellipse( _GFILLINTERIOR, 30,  0, 240, 120 );

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


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

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