2024-05-20 03:46:09 -06:00
|
|
|
#include "arc/graphics/rectangle.h"
|
|
|
|
|
#include "renderer.h"
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2025-03-17 02:31:23 -06:00
|
|
|
void ARC_Rect_Render(ARC_Rect rect, ARC_Renderer *renderer, ARC_Color color){
|
|
|
|
|
SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color.r, color.g, color.b, color.a);
|
|
|
|
|
SDL_RenderDrawRect((SDL_Renderer *)renderer, (SDL_Rect *)&rect);
|
2024-05-20 03:46:09 -06:00
|
|
|
}
|
|
|
|
|
|
2025-03-17 02:31:23 -06:00
|
|
|
void ARC_Rect_RenderFill(ARC_Rect rect, ARC_Renderer *renderer, ARC_Color color){
|
|
|
|
|
SDL_SetRenderDrawColor((SDL_Renderer *)renderer, color.r, color.g, color.b, color.a);
|
|
|
|
|
SDL_RenderFillRect((SDL_Renderer *)renderer, (SDL_Rect *)&rect);
|
2024-05-20 03:46:09 -06:00
|
|
|
}
|
|
|
|
|
|
2025-03-17 02:31:23 -06:00
|
|
|
void ARC_FRect_Render(ARC_FRect rect, ARC_Renderer *renderer, ARC_Color color){
|
2024-05-20 03:46:09 -06:00
|
|
|
ARC_Rect casted = ARC_FRect_CastToRect(rect);
|
2025-03-17 02:31:23 -06:00
|
|
|
ARC_Rect_Render(casted, renderer, color);
|
2024-05-20 03:46:09 -06:00
|
|
|
}
|
|
|
|
|
|
2025-03-17 02:31:23 -06:00
|
|
|
void ARC_FRect_RenderFill(ARC_FRect rect, ARC_Renderer *renderer, ARC_Color color){
|
2024-05-20 03:46:09 -06:00
|
|
|
ARC_Rect casted = ARC_FRect_CastToRect(rect);
|
2025-03-17 02:31:23 -06:00
|
|
|
ARC_Rect_RenderFill(casted, renderer, color);
|
|
|
|
|
}
|