Registry / utility / sdl2-gfx

sdl2-gfx

JSON →
library1.0.4vcpkgunverified

Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions for SDL2.

vcpkg install sdl2-gfx
INSTALL
IMPORT
SIG · SDL2-GFX
S
sdl2-gfx
utilitycppv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SDL2/SDL2_gfxPrimitives.h
#include <SDL2/SDL2_gfxPrimitives.h>

Draw a filled red circle using SDL2_gfx

#include <SDL2/SDL.h> #include <SDL2/SDL2_gfxPrimitives.h> int main() { SDL_Init(SDL_INIT_VIDEO); SDL_Window* win = SDL_CreateWindow("Test", 0, 0, 640, 480, 0); SDL_Renderer* ren = SDL_CreateRenderer(win, -1, 0); filledCircleRGBA(ren, 320, 240, 100, 255, 0, 0, 255); SDL_RenderPresent(ren); SDL_Delay(3000); SDL_Quit(); return 0; }
Debug
Known issues
gotchaRequires SDL2 to be linked and initialized before using SDL2_gfx functions.
fix
Ensure you link both SDL2::SDL2 and SDL2_gfx::SDL2_gfx in CMake, and call SDL_Init() first.
affects: *
Upgrade
Version history
1.0.4latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

sdl2-gfx — pip install sdl2-gfx · libregistry