27 |
#define SDL_GFXPRIMITIVES_MAJOR 1 |
#define SDL_GFXPRIMITIVES_MAJOR 1 |
28 |
#define SDL_GFXPRIMITIVES_MINOR 5 |
#define SDL_GFXPRIMITIVES_MINOR 5 |
29 |
|
|
|
/* ----- W32 DLL interface */ |
|
|
|
|
|
#ifdef WIN32 |
|
|
#ifdef BUILD_DLL |
|
|
#define DLLINTERFACE __declspec(dllexport) |
|
|
#else |
|
|
#define DLLINTERFACE __declspec(dllimport) |
|
|
#endif |
|
|
#else |
|
|
#define DLLINTERFACE |
|
|
#endif |
|
|
|
|
30 |
/* ----- Prototypes */ |
/* ----- Prototypes */ |
31 |
|
|
32 |
/* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */ |
/* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */ |
33 |
|
|
34 |
/* Pixel */ |
/* Pixel */ |
35 |
|
|
36 |
DLLINTERFACE int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color); |
int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color); |
37 |
DLLINTERFACE int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
38 |
|
|
39 |
/* Horizontal line */ |
/* Horizontal line */ |
40 |
|
|
41 |
DLLINTERFACE int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); |
int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color); |
42 |
DLLINTERFACE int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
43 |
|
|
44 |
/* Vertical line */ |
/* Vertical line */ |
45 |
|
|
46 |
DLLINTERFACE int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); |
int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color); |
47 |
DLLINTERFACE int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
48 |
|
|
49 |
/* Rectangle */ |
/* Rectangle */ |
50 |
|
|
51 |
DLLINTERFACE int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
52 |
DLLINTERFACE int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
53 |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
54 |
|
|
55 |
/* Filled rectangle (Box) */ |
/* Filled rectangle (Box) */ |
56 |
|
|
57 |
DLLINTERFACE int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
58 |
DLLINTERFACE int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, |
int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, |
59 |
Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
60 |
|
|
61 |
/* Line */ |
/* Line */ |
62 |
|
|
63 |
DLLINTERFACE int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
64 |
DLLINTERFACE int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
65 |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
66 |
|
|
67 |
/* AA Line */ |
/* AA Line */ |
68 |
DLLINTERFACE int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color); |
69 |
DLLINTERFACE int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, |
70 |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
71 |
|
|
72 |
/* Circle */ |
/* Circle */ |
73 |
|
|
74 |
DLLINTERFACE int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
75 |
DLLINTERFACE int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
76 |
|
|
77 |
/* AA Circle */ |
/* AA Circle */ |
78 |
|
|
79 |
DLLINTERFACE int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
80 |
DLLINTERFACE int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
81 |
Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
82 |
|
|
83 |
/* Filled Circle */ |
/* Filled Circle */ |
84 |
|
|
85 |
DLLINTERFACE int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color); |
86 |
DLLINTERFACE int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
87 |
Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
88 |
|
|
89 |
/* Ellipse */ |
/* Ellipse */ |
90 |
|
|
91 |
DLLINTERFACE int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); |
int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); |
92 |
DLLINTERFACE int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
93 |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
94 |
|
|
95 |
/* AA Ellipse */ |
/* AA Ellipse */ |
96 |
|
|
97 |
DLLINTERFACE int aaellipseColor(SDL_Surface * dst, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color); |
int aaellipseColor(SDL_Surface * dst, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color); |
98 |
DLLINTERFACE int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
99 |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
100 |
|
|
101 |
/* Filled Ellipse */ |
/* Filled Ellipse */ |
102 |
|
|
103 |
DLLINTERFACE int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); |
int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color); |
104 |
DLLINTERFACE int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, |
105 |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
106 |
/* Filled Pie */ |
/* Filled Pie */ |
107 |
|
|
108 |
DLLINTERFACE int filledpieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, |
int filledpieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, |
109 |
Sint16 start, Sint16 end, Uint32 color); |
Sint16 start, Sint16 end, Uint32 color); |
110 |
DLLINTERFACE int filledpieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, |
int filledpieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, |
111 |
Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
112 |
|
|
113 |
/* Polygon */ |
/* Polygon */ |
114 |
|
|
115 |
DLLINTERFACE int polygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); |
int polygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); |
116 |
DLLINTERFACE int polygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, |
int polygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, |
117 |
int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
118 |
|
|
119 |
/* AA-Polygon */ |
/* AA-Polygon */ |
120 |
|
|
121 |
DLLINTERFACE int aapolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); |
int aapolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color); |
122 |
DLLINTERFACE int aapolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, |
int aapolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, |
123 |
int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
124 |
|
|
125 |
/* Filled Polygon */ |
/* Filled Polygon */ |
126 |
|
|
127 |
DLLINTERFACE int filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color); |
int filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color); |
128 |
DLLINTERFACE int filledPolygonRGBA(SDL_Surface * dst, Sint16 * vx, |
int filledPolygonRGBA(SDL_Surface * dst, Sint16 * vx, |
129 |
Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
130 |
|
|
131 |
/* 8x8 Characters/Strings */ |
/* 8x8 Characters/Strings */ |
132 |
|
|
133 |
DLLINTERFACE int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color); |
int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color); |
134 |
DLLINTERFACE int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
135 |
DLLINTERFACE int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint32 color); |
int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint32 color); |
136 |
DLLINTERFACE int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint8 r, Uint8 g, Uint8 b, Uint8 a); |
137 |
|
|
138 |
/* Ends C function definitions when using C++ */ |
/* Ends C function definitions when using C++ */ |
139 |
#ifdef __cplusplus |
#ifdef __cplusplus |