Added ability to draw a non-filled rectangle
This commit is contained in:
1 parent
c1659dcf88
commit
a87eba8db7
7 files changed
+45
-12
No files matched your search
@@ -49,6 +49,15 @@ void render_clear(const Renderer *renderer, SDL_Color color) {
|
||||
SDL_RenderClear(renderer->SDL_base_renderer);
|
||||
}
|
||||
|
||||
void draw_rect(const Renderer *renderer, SDL_Color color, float x, float y,
|
||||
float w, float h) {
|
||||
SDL_FRect dest = {x, y, w, h};
|
||||
|
||||
SDL_SetRenderDrawColor(renderer->SDL_base_renderer, color.r, color.g, color.b,
|
||||
color.a);
|
||||
SDL_RenderDrawRectF(renderer->SDL_base_renderer, &dest);
|
||||
}
|
||||
|
||||
void fill_rect(const Renderer *renderer, SDL_Color color, float x, float y,
|
||||
float w, float h) {
|
||||
SDL_FRect dest = {x, y, w, h};
|
||||
|
||||
Reference in new issue
Block a user