#include "arc/graphics/rectangle.h"
#include "renderer.h"
#include <stdlib.h>

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);
}

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);
}

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);
}

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);
}