The SDL2_gfx library provides the basic drawing functions such as circles or triangles against renderers of SDL2.
This PR adds optional bindings for SDL2_gfx and closes #20.
While the library provides support functions for other concerns (such as framerate control), only graphics related functions are binded in src/lib_gfx.cr.
src/gfx.cr defines 3 new shapes (Circle, Ellipse and Triangle) under SDL namespace and defines new drawing methods for SDL::Renderer.
I added the samples/gfx.cr example which showcase the new drawing methods.
The
SDL2_gfx
library provides the basic drawing functions such as circles or triangles against renderers of SDL2.This PR adds optional bindings for SDL2_gfx and closes #20. While the library provides support functions for other concerns (such as framerate control), only graphics related functions are binded in
src/lib_gfx.cr
.src/gfx.cr
defines 3 new shapes (Circle
,Ellipse
andTriangle
) underSDL
namespace and defines new drawing methods forSDL::Renderer
.I added the
samples/gfx.cr
example which showcase the new drawing methods.