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_traverseline http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                             fg_traverseline

   Usage
   #include <fg.h>
   void   far  fg_traverseline(int  line_type,   fg_const_pline_t   line,
   fg_coord_t far *pt_pair_buff);

   Description
   Fills  an array with x, y points that traverse a line. Useful for  use
   with   fg_filloutline.  The  point  pairs  are  put  in   the   buffer
   pt_pair_buff  which must be supplied by the user. The worst case  size
   (solid line) requirements  for the buffer can be obtained with the aid
   of a call to fg_linepixels.

   Example
   unsigned int get_line_points(fg_coord_t *buff, fg_const_pline_t line)
   {
   fg_coord_t *buff;
   unsigned int buff_size = fg_linepixels(line);
   buff = malloc(buff_size * 2 * sizeof(fg_coord_t));
   if(buff)
   fg_traverseline(FG_LINE_SOLID, line, buff);
   else
   buff_size = 0;
   return buff_size;
   }


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