Add fill_rect function
This commit is contained in:
1 parent
921bfbf63c
commit
63312be847
2 files changed
+9
No files matched your search
@@ -81,3 +81,11 @@ void draw_rect(const window_t *wnd, const rect_t *rect, colour_t colour) {
|
||||
|
||||
SDL_RenderDrawRect(wnd->renderer, &dst);
|
||||
}
|
||||
|
||||
void fill_rect(const window_t *wnd, const rect_t *rect, colour_t colour) {
|
||||
set_colour(wnd, colour);
|
||||
|
||||
SDL_Rect dst = {rect->topleft.x, rect->topleft.y, rect->w, rect->h};
|
||||
|
||||
SDL_RenderFillRect(wnd->renderer, &dst);
|
||||
}
|
||||
Reference in new issue
Block a user