-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDraw.cpp
More file actions
15 lines (13 loc) · 704 Bytes
/
Copy pathDraw.cpp
File metadata and controls
15 lines (13 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "Draw.h"
void Draw::RenderRect(Geometric& rect_size, const ColorData& color_data, SDL_Renderer* screen)
{
SDL_Rect fill_rect= {rect_size.left_, rect_size.top_, rect_size.width_, rect_size.height_};
SDL_SetRenderDrawColor(screen, color_data.red_, color_data.blue_, color_data.green_, 255);
SDL_RenderFillRect(screen, &fill_rect);
}
void Draw::RenderOutline(Geometric& rect_size, const ColorData& color_data, SDL_Renderer* screen)
{
SDL_Rect out_rect= {rect_size.left_, rect_size.top_, rect_size.width_, rect_size.height_};
SDL_SetRenderDrawColor(screen, color_data.red_, color_data.green_, color_data.blue_, 255);
SDL_RenderDrawRect(screen, &out_rect);
}