Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fg_drawarc http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                fg_drawarc

   Usage
   #include <fg.h>
   void far fg_drawarc(fg_color_t color, int mode, int mask,fg_coord_t x,
   fg_coord_t  y,  fg_coord_t  radius,  int  startangle,  int   endangle,
   fg_const_pbox_t clipbox);

   Description
   Draw a circular arc counter-clockwise from startangle to endangle.

   Input
   x,y            Center of circle
   radius         Radius of circle
   clipbox        Bounding box of the arc.
   startangle     Value from 0..3600 (10ths of a degree)
   endangle       Value from 0..3600 (10ths of a degree).

   To  draw a complete circle, use 0, 3600 for the start and end  angles.
   Note that a zero radius or zero angular distance arc will be drawn  as
   one pixel. 0 degrees is to the right, such that an arc drawn from 0 to
   900  will  be in the upper right quadrant of the circle  described  by
   "radius". Although the units for the start and end angles are in 10ths
   of  a  degree, there is a maximum error of about 3  degrees  for  some
   angles.

   The arc is circular in pixel units. On most displays it will appear as
   an  ellipse  due  to  the difference in dimensions  in  the  x  and  y
   directions of each pixel (the aspect ratio). If a circular  appearance
   is required use fg_drawellipse with the appropriate scaling for the  x
   and y radii calculated with the use of fg.pixelx and fg.pixely.
   Example

   fg_drawarc(FG_WHITE, FG_MODE_XOR, ~0,
   fg.displaybox [FG_X2]/2,
   fg.displaybox [FG_Y2] + 10,
   fg.displaybox [FG_Y2]/2,
   1800, 3600, fg.displaybox);

   /* This will result in the lower half ofa circle being drawn with it's
   center above the top of the screen */


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