30#ifndef _SDL3_gfxPrimitives_h
31#define _SDL3_gfxPrimitives_h
35#define M_PI 3.1415926535897932384626433832795
47#define SDL3_GFXPRIMITIVES_MAJOR 1
48#define SDL3_GFXPRIMITIVES_MINOR 0
49#define SDL3_GFXPRIMITIVES_MICRO 0
55# if defined(DLL_EXPORT) && !defined(LIBSDL3_GFX_DLL_IMPORT)
56# define SDL3_GFXPRIMITIVES_SCOPE __declspec(dllexport)
58# ifdef LIBSDL3_GFX_DLL_IMPORT
59# define SDL3_GFXPRIMITIVES_SCOPE __declspec(dllimport)
63#ifndef SDL3_GFXPRIMITIVES_SCOPE
64# define SDL3_GFXPRIMITIVES_SCOPE extern
88 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
94 Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
100 Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
106 Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
112 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
118 Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
122 Uint8 width, Uint32 color);
124 Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
135 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
141 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
147 Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
153 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
159 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
165 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
170 Sint16 start, Sint16 end, Uint32 color);
172 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
177 Sint16 start, Sint16 end, Uint32 color);
179 Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
185 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
191 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
197 Uint8 r, Uint8 g, Uint8 b, Uint8 a);
203 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
209 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
215 const Sint16 * vy,
int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
225 int n,
int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
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.
SDL3_GFXPRIMITIVES_SCOPE bool rectangleColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw rectangle with blending.
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.
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.
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.
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.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE bool aaellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw anti-aliased ellipse with blending.
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.
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.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE bool boxColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw box (filled rectangle) with blending.
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.
SDL3_GFXPRIMITIVES_SCOPE bool characterColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
Draw a character of the currently set font.
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.
SDL3_GFXPRIMITIVES_SCOPE bool aacircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw anti-aliased circle with blending.
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.
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.
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.
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.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE bool arcColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
Arc with blending.
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.
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.
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.
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.
#define SDL3_GFXPRIMITIVES_SCOPE
SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFont(const void *fontdata, Uint32 cw, Uint32 ch)
Sets or resets the current global font data.
SDL3_GFXPRIMITIVES_SCOPE bool hlineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
Draw horizontal line with blending.
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.
SDL3_GFXPRIMITIVES_SCOPE bool vlineColor(SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
Draw vertical line with blending.
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.
SDL3_GFXPRIMITIVES_SCOPE bool pixelColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
Draw pixel with blending enabled if a<255.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE bool filledCircleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 r, Uint32 color)
Draw filled circle with blending.
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.
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.
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.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE bool circleColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
Draw circle with blending.
SDL3_GFXPRIMITIVES_SCOPE bool filledPolygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw filled polygon with alpha blending.
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.
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.
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.
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.
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.
SDL3_GFXPRIMITIVES_SCOPE void gfxPrimitivesSetFontRotation(Uint32 rotation)
Sets current global font character rotation steps.
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.
SDL3_GFXPRIMITIVES_SCOPE bool ellipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw ellipse with blending.
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.
SDL3_GFXPRIMITIVES_SCOPE bool lineColor(SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
Draw line with alpha blending.
SDL3_GFXPRIMITIVES_SCOPE bool filledEllipseColor(SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
Draw filled ellipse with blending.
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.
SDL3_GFXPRIMITIVES_SCOPE bool polygonColor(SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
Draw polygon with alpha blending.
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.