home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / contrib / bcc2grx / src / bccgrx00.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-03  |  1.7 KB  |  68 lines

  1. /*
  2.  *  BCC2GRX  -  Interfacing Borland based graphics programs to LIBGRX
  3.  *  Copyright (C) 1993  Hartmut Schirmer
  4.  *
  5.  *  see bccgrx.c for details
  6.  */
  7.  
  8. #ifndef __BCCGRX00_H
  9. #define __BCCGRX00_H
  10.  
  11. #define HOLD_GR_DEFS
  12.  
  13. #include <stddef.h>
  14. #include <grx.h>
  15. #include <grdriver.h>
  16. #include "../include/bccgrx.h"
  17.  
  18. /* --- from grx/genellipse : */
  19.  
  20. extern int _grx_arc_xc, _grx_arc_yc,
  21.        _grx_arc_xs, _grx_arc_ys,
  22.        _grx_arc_xe, _grx_arc_ye;
  23.  
  24. /* --- from bccgrx.c : */
  25.  
  26. extern GrLineOption          __gr_Line;
  27. extern short                *__gr_modeindx;
  28. extern GR_DRIVER_MODE_ENTRY *__gr_DATA;
  29. extern GrContext            *__gr_viewport;
  30. extern char                  __gr_BGICHR[];
  31.  
  32. /* ------------------------- */
  33.  
  34. #define ERR    __gr_Result
  35. #define MM     __gr_MaxMode
  36. #define X      __gr_X
  37. #define Y      __gr_Y
  38. #define LNE    __gr_Line
  39. #define LNEP   __gr_LineP
  40. #define COL    __gr_color
  41. #define COLBG  __gr_colorbg
  42. #define FILL   __gr_colorfill
  43. #define WR     __gr_WR
  44. #define FPATT  __gr_fpatno
  45. #define FILLP  __gr_fillpattern
  46. #define VL     __gr_vpl
  47. #define VR     __gr_vpr
  48. #define VT     __gr_vpt
  49. #define VB     __gr_vpb
  50.  
  51. #define WIDTH  (__gr_vpr-__gr_vpl+1)
  52. #define HEIGHT (__gr_vpb-__gr_vpt+1)
  53. #define SWAP(a,b) ({typeof(a) tmp; tmp = a; a = b; b = tmp;})
  54.  
  55. #define _DO_INIT_CHECK ({if (!__gr_INIT) {__gr_Result=grNoInitGraph;return;}})
  56. #define _DO_INIT_CHECK_RV(rv) ({if (!__gr_INIT) { __gr_Result = grNoInitGraph;\
  57.                           return (rv);}})
  58.  
  59. /* ----------------------------------------------------------------- */
  60. __inline__ static void __gr_Reset_ClipBox(void)
  61. {
  62.   if (__gr_clip) GrSetClipBox( VL, VT, VR, VB);
  63.         else GrResetClipBox();
  64. }
  65.  
  66.  
  67. #endif
  68.