home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / emxdev8f.zip / GRAPH.H < prev    next >
C/C++ Source or Header  |  1992-12-10  |  2KB  |  78 lines

  1. /* graph.h (emx+gcc) */
  2.  
  3. #if !defined (_GRAPH_H)
  4. #define _GRAPH_H
  5.  
  6. #if defined (__cplusplus)
  7. extern "C" {
  8. #endif
  9.  
  10. /* g_mode() and g_modeset() arguments (MODE) */
  11.  
  12. #define G_MODE_OFF         0    /* Back to previous mode                    */
  13.  
  14. #define G_MODE_VGA_L      26    /* VGA 320x200 256 colors                   */
  15.  
  16. #define G_SET_KEEP         0     /* No change                               */
  17.  
  18. /* g_wmode() arguments */
  19.  
  20. #define G_NORM 0                /* Normal write mode */
  21. #define G_AND  1                /* `AND' mode        */
  22. #define G_OR   2                /* `OR' mode         */
  23. #define G_XOR  3                /* `XOR' mode        */
  24.  
  25. /* Fill or draw outline */
  26.  
  27. #define G_OUTLINE      0             /* Draw outline */
  28. #define G_FILL         1             /* Fill         */
  29.  
  30. /* EGA colors */
  31.  
  32. #define G_BLACK        0
  33. #define G_BLUE         1
  34. #define G_GREEN        2
  35. #define G_CYAN         3
  36. #define G_RED          4
  37. #define G_MAGENTA      5
  38. #define G_YELLOW       6
  39. #define G_BROWN        6
  40. #define G_WHITE        7
  41.  
  42. #define G_INTENSITY    8
  43.  
  44. /* Screen dimensions */
  45.  
  46. extern int g_xsize;             /* Screen width             */
  47. extern int g_ysize;             /* Screen height            */
  48. extern int g_colors;            /* Number of colors         */
  49.  
  50.  
  51. void g_box (int x0, int y0, int x1, int y1, int color, int fill_flag);
  52. void g_clear (int color);
  53. void g_clip (int x0, int y0, int x1, int y1);
  54. void g_ellipse (int cx, int cy, int rx, int ry, int color, int fill_flag);
  55. int g_get (int x, int y);
  56. void g_hline (int y, int x0, int x1, int color);
  57. void g_line (int x0, int y0, int x1,int y1, int color);
  58. void g_lock (void);
  59. int g_mode (int mode);
  60. int g_modeset (int mode, int flag);
  61. void g_polygon (__const__ int *x, __const__ int *y, int n, int color,
  62.     int fill_flag);
  63. void g_set (int x, int y, int color);
  64. void g_triangle (int x0, int y0, int x1, int y1, int x2, int y2, int color,
  65.     int fill_flag);
  66. void g_unlock (void);
  67. void g_unlockall (void);
  68. void g_vgapal (const char *pal, int first, int n, int wait_flag);
  69. void g_vline (int x, int y0, int y1,int color);
  70. void g_waitv (void);
  71. void g_wmode (int wmode);
  72.  
  73. #if defined (__cplusplus)
  74. }
  75. #endif
  76.  
  77. #endif /* !defined (_GRAPH_H) */
  78.