1 #ifndef GRAPHICS_GFXMACROS_H
2 #define GRAPHICS_GFXMACROS_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: AmigaOS include file graphics/gfxmacros.h
13 # include <exec/types.h>
16 #ifndef GRAPHICS_RASTPORT_H
17 # include <graphics/rastport.h>
20 /* NOTE: The following symbol must be defined in your source
21 code if one needs the old style macros. Otherwise
22 one will get the new veresions, which are more robust */
24 #ifdef OLD_GRAPHICS_GFXMACROS_H
26 /* Some macros which should be functions... */
27 #define SetDrPt(w,p) \
30 (w)->Flags |= FRST_DOT|0x10; \
31 (w)->linpatcnt = 15; \
34 #define SetAfPt(w,p,n) \
40 #define SetOPen(w,c) \
43 (w)->Flags |= AREAOUTLINE; \
46 #define SetAOlPen(w,p) SetOutlinePen(w,p)
47 #define SetWrMsk(w,m) SetWriteMask(w,m)
48 #define BNDRYOFF(w) {(w)->Flags &= ~AREAOUTLINE;}
50 /* Some macros for copper lists */
51 #define CINIT(c,n) UCopperListInit(c,n);
52 #define CMOVE(c,a,b) { CMove(c,&a,b); CBump(c); }
53 #define CWAIT(c,a,b) { CWait(c,a,b); CBump(c); }
54 #define CEND(c) { CWAIT(c,10000,255); }
57 #define DrawCircle(rp,cx,cy,r) DrawEllipse(rp,cx,cy,r,r);
58 #define AreaCircle(rp,cx,cy,r) AreaEllipse(rp,cx,cy,r,r);
60 #else /* OLD_GRAPHICS_GFXMACROS_H */
62 /* Some macros which should be functions... */
63 #define SetDrPt(w,p) \
66 (w)->Flags |= FRST_DOT|0x10; \
67 (w)->linpatcnt = 15; \
70 #define SetAfPt(w,p,n) \
76 #define SetOPen(w,c) \
79 (w)->Flags |= AREAOUTLINE; \
82 #define SetAOlPen(w,p) SetOutlinePen(w,p)
83 #define SetWrMsk(w,m) SetWriteMask(w,m)
87 (w)->Flags &= ~AREAOUTLINE; \
91 /* Some macros for copper lists */
92 #define CINIT(c,n) UCopperListInit(c,n)
94 #define CMOVE(c,a,b) do { \
99 #define CWAIT(c,a,b) do { \
104 #define CEND(c) do { \
105 CWAIT(c,10000,255); \
109 #define DrawCircle(rp,cx,cy,r) DrawEllipse(rp,cx,cy,r,r);
110 #define AreaCircle(rp,cx,cy,r) AreaEllipse(rp,cx,cy,r,r);
112 #endif /* OLD_GRAPHICS_GFXMACROS_H */
114 #endif /* GRAPHICS_GFXMACROS_H */