2024-02-08 17:47:32 -07:00
|
|
|
#ifdef ARC_SDL2_GRAPHICS
|
2023-03-10 17:34:22 -07:00
|
|
|
#include "arc/graphics/rectangle.h"
|
2023-01-03 19:21:57 -07:00
|
|
|
#include "arc/graphics/sdl/renderer.h"
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
void ARC_Rect_Render(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
2023-03-10 17:34:22 -07:00
|
|
|
SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color->r, color->g, color->b, color->a);
|
|
|
|
|
SDL_RenderDrawRect((SDL_Renderer *)renderer, (SDL_Rect *) rect);
|
2023-01-03 19:21:57 -07:00
|
|
|
}
|
|
|
|
|
|
2023-02-23 00:07:18 -07:00
|
|
|
void ARC_Rect_RenderFill(ARC_Rect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
2023-03-10 17:34:22 -07:00
|
|
|
SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color->r, color->g, color->b, color->a);
|
|
|
|
|
SDL_RenderFillRect((SDL_Renderer *)renderer, (SDL_Rect *) rect);
|
2023-02-23 00:07:18 -07:00
|
|
|
}
|
|
|
|
|
|
2023-06-25 22:14:32 -06:00
|
|
|
void ARC_FRect_Render(ARC_FRect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
|
|
|
|
ARC_Rect casted = ARC_FRect_CastToRect(rect);
|
|
|
|
|
ARC_Rect_Render(&casted, renderer, color);
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-10 00:19:28 -06:00
|
|
|
void ARC_FRect_RenderFill(ARC_FRect *rect, ARC_Renderer *renderer, ARC_Color *color){
|
|
|
|
|
ARC_Rect casted = ARC_FRect_CastToRect(rect);
|
|
|
|
|
ARC_Rect_RenderFill(&casted, renderer, color);
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-08 17:47:32 -07:00
|
|
|
#endif // ARC_SDL2_GRAPHICS
|