home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / vifs / xorpolyl.c < prev   
Encoding:
C/C++ Source or Header  |  1989-07-09  |  580 b   |  32 lines

  1. /*
  2.  *    xorpolyline.c  --  xor display polyline.
  3.  *               Uses current color.
  4.  *
  5.  *    9 july 1989  Olle Olsson.
  6.  */
  7.  
  8. #include <graphics.h>
  9. #include "egatc.h"
  10.  
  11. /* the prototype could be placed in egatc.h */
  12. void xorpolyline( int ncorners, int corners[] );
  13.  
  14. void xorpolyline( nco, co )
  15. int nco;        /* number of corners */
  16. int co[];        /* the corners */
  17. {
  18. register int cl;
  19.  
  20. if (nco < 2)
  21.     return;
  22.  
  23. /* get current color */
  24. cl = getcolor();
  25.  
  26. /* the vector contains nco * 2 values */
  27. for (--nco; nco; --nco, co += 2)
  28.     xorline( co[0], co[1], co[2], co[3], cl );
  29. }
  30.  
  31.  
  32.