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>getarccoords() get last arc coordinates</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 getarccoords()          Get Last Arc Coordinates

 #include   <graphics.h>

 void far                 getarccoords(arccoords);
 struct arccoordstype far *arccoords;

    getarccoords() gets information about the last call to arc(). It
    stores it in a structure of type 'arccoordstype' which is pointed to
    by 'arccoords'. The 'arccoordstype' structure is defined in
    <graphics.h> :

          struct arccoordstype {
               int x, y;
               int xstart, ystart, xend, yend;
          };

    ('x','y') specifies the center point of the arc. ('xstart','ystart')
    specifies the starting position, and ('xend','yend') specifies the
    ending position of the arc.

    Returns:    Nothing.

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

    The following statements draw a half circle.

           #include <graphics.h>

           main()
           {
               int gdriver = DETECT;
               int gmode;
               struct arccoordstype arcinfo;

               initgraph(&gdriver,&gmode,"");
               arc(320,150,0,179,50);
               getarccoords(&arcinfo);
               line(arcinfo.xstart,arcinfo.ystart,arcinfo.xend,arcinfo.yend);
               getch();
               closegraph();
           }


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

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