SDL3_gfx 1.0.1 Graphics primitives and surface functions for SDL3

SDL3_gfxPrimitives.h
Go to the documentation of this file.
1/*
2
3 SDL3_gfxPrimitives.h: graphics primitives for SDL
4
5 Copyright (C) 2012-2014 Andreas Schiffler
6
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19
20 2. Altered source versions must be plainly marked as such, and must not be
21 misrepresented as being the original software.
22
23 3. This notice may not be removed or altered from any source
24 distribution.
25
26 Andreas Schiffler -- aschiffler at ferzkopp dot net
27
28*/
29
30#ifndef _SDL3_gfxPrimitives_h
31#define _SDL3_gfxPrimitives_h
32
33#include <math.h>
34#ifndef M_PI
35#define M_PI 3.1415926535897932384626433832795
36#endif
37
38#include <SDL3/SDL.h>
39
40/* Set up for C function definitions, even when using C++ */
41#ifdef __cplusplus
42 extern "C" {
43#endif
44
45 /* ----- Versioning */
46
47#define SDL3_GFXPRIMITIVES_MAJOR 1
48#define SDL3_GFXPRIMITIVES_MINOR 0
49#define SDL3_GFXPRIMITIVES_MICRO 0
50
51
52 /* ---- Function Prototypes */
53
54#ifdef _MSC_VER
55# if defined(DLL_EXPORT) && !defined(LIBSDL3_GFX_DLL_IMPORT)
56# define SDL3_GFXPRIMITIVES_SCOPE __declspec(dllexport)
57# else
58# ifdef LIBSDL3_GFX_DLL_IMPORT
59# define SDL3_GFXPRIMITIVES_SCOPE __declspec(dllimport)
60# endif
61# endif
62#endif
63#ifndef SDL3_GFXPRIMITIVES_SCOPE
64# define SDL3_GFXPRIMITIVES_SCOPE extern
65#endif
66
67 /* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */
68
69 /* Pixel */
70
71 SDL3_GFXPRIMITIVES_SCOPE bool pixelColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint32 color);
72 SDL3_GFXPRIMITIVES_SCOPE bool pixelRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
73
74 /* Horizontal line */
75
76 SDL3_GFXPRIMITIVES_SCOPE bool hlineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
77 SDL3_GFXPRIMITIVES_SCOPE bool hlineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
78
79 /* Vertical line */
80
81 SDL3_GFXPRIMITIVES_SCOPE bool vlineColor(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color);
82 SDL3_GFXPRIMITIVES_SCOPE bool vlineRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
83
84 /* Rectangle */
85
86 SDL3_GFXPRIMITIVES_SCOPE bool rectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
87 SDL3_GFXPRIMITIVES_SCOPE bool rectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
88 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
89
90 /* Rounded-Corner Rectangle */
91
92 SDL3_GFXPRIMITIVES_SCOPE bool roundedRectangleColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
93 SDL3_GFXPRIMITIVES_SCOPE bool roundedRectangleRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
94 Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
95
96 /* Filled rectangle (Box) */
97
98 SDL3_GFXPRIMITIVES_SCOPE bool boxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
99 SDL3_GFXPRIMITIVES_SCOPE bool boxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2,
100 Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
101
102 /* Rounded-Corner Filled rectangle (Box) */
103
104 SDL3_GFXPRIMITIVES_SCOPE bool roundedBoxColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color);
105 SDL3_GFXPRIMITIVES_SCOPE bool roundedBoxRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2,
106 Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
107
108 /* Line */
109
110 SDL3_GFXPRIMITIVES_SCOPE bool lineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
111 SDL3_GFXPRIMITIVES_SCOPE bool lineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
112 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
113
114 /* AA Line */
115
116 SDL3_GFXPRIMITIVES_SCOPE bool aalineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
117 SDL3_GFXPRIMITIVES_SCOPE bool aalineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1,
118 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
119
120 /* Thick Line */
121 SDL3_GFXPRIMITIVES_SCOPE bool thickLineColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
122 Uint8 width, Uint32 color);
123 SDL3_GFXPRIMITIVES_SCOPE bool thickLineRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2,
124 Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
125
126 /* Circle */
127
128 SDL3_GFXPRIMITIVES_SCOPE bool circleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
129 SDL3_GFXPRIMITIVES_SCOPE bool circleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
130
131 /* Arc */
132
133 SDL3_GFXPRIMITIVES_SCOPE bool arcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color);
134 SDL3_GFXPRIMITIVES_SCOPE bool arcRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end,
135 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
136
137 /* AA Circle */
138
139 SDL3_GFXPRIMITIVES_SCOPE bool aacircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color);
140 SDL3_GFXPRIMITIVES_SCOPE bool aacircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
141 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
142
143 /* Filled Circle */
144
145 SDL3_GFXPRIMITIVES_SCOPE bool filledCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
146 SDL3_GFXPRIMITIVES_SCOPE bool filledCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
147 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
148
149 /* Ellipse */
150
151 SDL3_GFXPRIMITIVES_SCOPE bool ellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
152 SDL3_GFXPRIMITIVES_SCOPE bool ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
153 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
154
155 /* AA Ellipse */
156
157 SDL3_GFXPRIMITIVES_SCOPE bool aaellipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
158 SDL3_GFXPRIMITIVES_SCOPE bool aaellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
159 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
160
161 /* Filled Ellipse */
162
163 SDL3_GFXPRIMITIVES_SCOPE bool filledEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
164 SDL3_GFXPRIMITIVES_SCOPE bool filledEllipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y,
165 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
166
167 /* Pie */
168
169 SDL3_GFXPRIMITIVES_SCOPE bool pieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
170 Sint16 start, Sint16 end, Uint32 color);
171 SDL3_GFXPRIMITIVES_SCOPE bool pieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
172 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
173
174 /* Filled Pie */
175
176 SDL3_GFXPRIMITIVES_SCOPE bool filledPieColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
177 Sint16 start, Sint16 end, Uint32 color);
178 SDL3_GFXPRIMITIVES_SCOPE bool filledPieRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad,
179 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
180
181 /* Trigon */
182
183 SDL3_GFXPRIMITIVES_SCOPE bool trigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
184 SDL3_GFXPRIMITIVES_SCOPE bool trigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
185 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
186
187 /* AA-Trigon */
188
189 SDL3_GFXPRIMITIVES_SCOPE bool aatrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
190 SDL3_GFXPRIMITIVES_SCOPE bool aatrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
191 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
192
193 /* Filled Trigon */
194
195 SDL3_GFXPRIMITIVES_SCOPE bool filledTrigonColor(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color);
196 SDL3_GFXPRIMITIVES_SCOPE bool filledTrigonRGBA(SDL_Renderer * renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3,
197 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
198
199 /* Polygon */
200
201 SDL3_GFXPRIMITIVES_SCOPE bool polygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
202 SDL3_GFXPRIMITIVES_SCOPE bool polygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
203 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
204
205 /* AA-Polygon */
206
207 SDL3_GFXPRIMITIVES_SCOPE bool aapolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
208 SDL3_GFXPRIMITIVES_SCOPE bool aapolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
209 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
210
211 /* Filled Polygon */
212
213 SDL3_GFXPRIMITIVES_SCOPE bool filledPolygonColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, Uint32 color);
214 SDL3_GFXPRIMITIVES_SCOPE bool filledPolygonRGBA(SDL_Renderer * renderer, const Sint16 * vx,
215 const Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
216
217 /* Textured Polygon */
218
219 SDL3_GFXPRIMITIVES_SCOPE bool texturedPolygon(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, SDL_Surface * texture,int texture_dx,int texture_dy);
220
221 /* Bezier */
222
223 SDL3_GFXPRIMITIVES_SCOPE bool bezierColor(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy, int n, int s, Uint32 color);
224 SDL3_GFXPRIMITIVES_SCOPE bool bezierRGBA(SDL_Renderer * renderer, const Sint16 * vx, const Sint16 * vy,
225 int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
226
227 /* Characters/Strings */
228
229 SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch);
230 SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation);
231 SDL3_GFXPRIMITIVES_SCOPE bool characterColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint32 color);
232 SDL3_GFXPRIMITIVES_SCOPE bool characterRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
233 SDL3_GFXPRIMITIVES_SCOPE bool stringColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint32 color);
234 SDL3_GFXPRIMITIVES_SCOPE bool stringRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
235
236 /* Ends C function definitions when using C++ */
237#ifdef __cplusplus
238}
239#endif
240
241#endif /* _SDL3_gfxPrimitives_h */
pieColor
SDL3_GFXPRIMITIVES_SCOPE bool pieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw pie (outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2167
rectangleColor
SDL3_GFXPRIMITIVES_SCOPE bool rectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw rectangle with blending.
Definition SDL3_gfxPrimitives.c:252
aapolygonColor
SDL3_GFXPRIMITIVES_SCOPE bool aapolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw anti-aliased polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2593
thickLineRGBA
SDL3_GFXPRIMITIVES_SCOPE bool thickLineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a thick line with alpha blending.
Definition SDL3_gfxPrimitives.c:3732
bezierRGBA
SDL3_GFXPRIMITIVES_SCOPE bool bezierRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a bezier curve with alpha blending.
Definition SDL3_gfxPrimitives.c:3630
roundedRectangleRGBA
SDL3_GFXPRIMITIVES_SCOPE bool roundedRectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner rectangle with blending.
Definition SDL3_gfxPrimitives.c:367
bezierColor
SDL3_GFXPRIMITIVES_SCOPE bool bezierColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
Draw a bezier curve with alpha blending.
Definition SDL3_gfxPrimitives.c:3609
aacircleRGBA
SDL3_GFXPRIMITIVES_SCOPE bool aacircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased circle with blending.
Definition SDL3_gfxPrimitives.c:1430
aaellipseColor
SDL3_GFXPRIMITIVES_SCOPE bool aaellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw anti-aliased ellipse with blending.
Definition SDL3_gfxPrimitives.c:1788
thickLineColor
SDL3_GFXPRIMITIVES_SCOPE bool thickLineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
Draw a thick line with alpha blending.
Definition SDL3_gfxPrimitives.c:3710
aaellipseRGBA
SDL3_GFXPRIMITIVES_SCOPE bool aaellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased ellipse with blending.
Definition SDL3_gfxPrimitives.c:1809
aatrigonColor
SDL3_GFXPRIMITIVES_SCOPE bool aatrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw anti-aliased trigon (triangle outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2321
aatrigonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool aatrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased trigon (triangle outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2353
boxColor
SDL3_GFXPRIMITIVES_SCOPE bool boxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw box (filled rectangle) with blending.
Definition SDL3_gfxPrimitives.c:687
texturedPolygon
SDL3_GFXPRIMITIVES_SCOPE bool texturedPolygon(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
Draws a polygon filled with the given texture.
Definition SDL3_gfxPrimitives.c:3187
characterColor
SDL3_GFXPRIMITIVES_SCOPE bool characterColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
Draw a character of the currently set font.
Definition SDL3_gfxPrimitives.c:3468
arcRGBA
SDL3_GFXPRIMITIVES_SCOPE bool arcRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Arc with blending.
Definition SDL3_gfxPrimitives.c:1175
aacircleColor
SDL3_GFXPRIMITIVES_SCOPE bool aacircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw anti-aliased circle with blending.
Definition SDL3_gfxPrimitives.c:1410
ellipseRGBA
SDL3_GFXPRIMITIVES_SCOPE bool ellipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw ellipse with blending.
Definition SDL3_gfxPrimitives.c:1690
roundedBoxRGBA
SDL3_GFXPRIMITIVES_SCOPE bool roundedBoxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rounded-corner box (filled rectangle) with blending.
Definition SDL3_gfxPrimitives.c:512
trigonColor
SDL3_GFXPRIMITIVES_SCOPE bool trigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw trigon (triangle outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2255
trigonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool trigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw trigon (triangle outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2287
filledEllipseRGBA
SDL3_GFXPRIMITIVES_SCOPE bool filledEllipseRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled ellipse with blending.
Definition SDL3_gfxPrimitives.c:2025
polygonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool polygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2532
arcColor
SDL3_GFXPRIMITIVES_SCOPE bool arcColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Arc with blending.
Definition SDL3_gfxPrimitives.c:1152
filledPieColor
SDL3_GFXPRIMITIVES_SCOPE bool filledPieColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Draw filled pie with alpha blending.
Definition SDL3_gfxPrimitives.c:2209
stringColor
SDL3_GFXPRIMITIVES_SCOPE bool stringColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
Draw a string in the currently set font.
Definition SDL3_gfxPrimitives.c:3489
roundedBoxColor
SDL3_GFXPRIMITIVES_SCOPE bool roundedBoxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner box (filled rectangle) with blending.
Definition SDL3_gfxPrimitives.c:490
filledPolygonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool filledPolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2895
SDL3_GFXPRIMITIVES_SCOPE
#define SDL3_GFXPRIMITIVES_SCOPE
Definition SDL3_gfxPrimitives.h:64
gfxPrimitivesSetFont
SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch)
Sets or resets the current global font data.
Definition SDL3_gfxPrimitives.c:3255
hlineColor
SDL3_GFXPRIMITIVES_SCOPE bool hlineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
Draw horizontal line with blending.
Definition SDL3_gfxPrimitives.c:152
filledTrigonColor
SDL3_GFXPRIMITIVES_SCOPE bool filledTrigonColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
Draw filled trigon (triangle) with alpha blending.
Definition SDL3_gfxPrimitives.c:2387
vlineColor
SDL3_GFXPRIMITIVES_SCOPE bool vlineColor(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
Draw vertical line with blending.
Definition SDL3_gfxPrimitives.c:209
lineRGBA
SDL3_GFXPRIMITIVES_SCOPE bool lineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw line with alpha blending.
Definition SDL3_gfxPrimitives.c:819
pixelColor
SDL3_GFXPRIMITIVES_SCOPE bool pixelColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
Draw pixel with blending enabled if a<255.
Definition SDL3_gfxPrimitives.c:65
vlineRGBA
SDL3_GFXPRIMITIVES_SCOPE bool vlineRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw vertical line with blending.
Definition SDL3_gfxPrimitives.c:229
filledPieRGBA
SDL3_GFXPRIMITIVES_SCOPE bool filledPieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled pie with alpha blending.
Definition SDL3_gfxPrimitives.c:2231
filledCircleColor
SDL3_GFXPRIMITIVES_SCOPE bool filledCircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
Draw filled circle with blending.
Definition SDL3_gfxPrimitives.c:1708
aalineColor
SDL3_GFXPRIMITIVES_SCOPE bool aalineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw anti-aliased line with alpha blending.
Definition SDL3_gfxPrimitives.c:1073
roundedRectangleColor
SDL3_GFXPRIMITIVES_SCOPE bool roundedRectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
Draw rounded-corner rectangle with blending.
Definition SDL3_gfxPrimitives.c:345
aalineRGBA
SDL3_GFXPRIMITIVES_SCOPE bool aalineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased line with alpha blending.
Definition SDL3_gfxPrimitives.c:1094
characterRGBA
SDL3_GFXPRIMITIVES_SCOPE bool characterRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a character of the currently set font.
Definition SDL3_gfxPrimitives.c:3347
aapolygonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool aapolygonRGBA(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw anti-aliased polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2613
circleColor
SDL3_GFXPRIMITIVES_SCOPE bool circleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw circle with blending.
Definition SDL3_gfxPrimitives.c:1112
filledPolygonColor
SDL3_GFXPRIMITIVES_SCOPE bool filledPolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw filled polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2875
rectangleRGBA
SDL3_GFXPRIMITIVES_SCOPE bool rectangleRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw rectangle with blending.
Definition SDL3_gfxPrimitives.c:273
circleRGBA
SDL3_GFXPRIMITIVES_SCOPE bool circleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw circle with blending.
Definition SDL3_gfxPrimitives.c:1132
filledTrigonRGBA
SDL3_GFXPRIMITIVES_SCOPE bool filledTrigonRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled trigon (triangle) with alpha blending.
Definition SDL3_gfxPrimitives.c:2421
stringRGBA
SDL3_GFXPRIMITIVES_SCOPE bool stringRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw a string in the currently set font.
Definition SDL3_gfxPrimitives.c:3509
boxRGBA
SDL3_GFXPRIMITIVES_SCOPE bool boxRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw box (filled rectangle) with blending.
Definition SDL3_gfxPrimitives.c:708
gfxPrimitivesSetFontRotation
SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation)
Sets current global font character rotation steps.
Definition SDL3_gfxPrimitives.c:3301
pixelRGBA
SDL3_GFXPRIMITIVES_SCOPE bool pixelRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pixel with blending enabled if a<255.
Definition SDL3_gfxPrimitives.c:84
ellipseColor
SDL3_GFXPRIMITIVES_SCOPE bool ellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw ellipse with blending.
Definition SDL3_gfxPrimitives.c:1669
pieRGBA
SDL3_GFXPRIMITIVES_SCOPE bool pieRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw pie (outline) with alpha blending.
Definition SDL3_gfxPrimitives.c:2190
lineColor
SDL3_GFXPRIMITIVES_SCOPE bool lineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw line with alpha blending.
Definition SDL3_gfxPrimitives.c:798
filledEllipseColor
SDL3_GFXPRIMITIVES_SCOPE bool filledEllipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw filled ellipse with blending.
Definition SDL3_gfxPrimitives.c:2004
hlineRGBA
SDL3_GFXPRIMITIVES_SCOPE bool hlineRGBA(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw horizontal line with blending.
Definition SDL3_gfxPrimitives.c:172
polygonColor
SDL3_GFXPRIMITIVES_SCOPE bool polygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw polygon with alpha blending.
Definition SDL3_gfxPrimitives.c:2450
filledCircleRGBA
SDL3_GFXPRIMITIVES_SCOPE bool filledCircleRGBA(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Draw filled circle with blending.
Definition SDL3_gfxPrimitives.c:1728