-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rectangle.h
39 lines (32 loc) · 914 Bytes
/
Rectangle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <SDL.h>
#ifndef __RECTANGLE_H__
#define __RECTANGLE_H__
class Rectangle {
private:
SDL_Rect rect;
SDL_Point position;
SDL_Point dimensions;
SDL_Color color;
//SDL_Renderer* Renderer = NULL;
float angle;
public:
Rectangle();
//Rectangle(SDL_Renderer* oRenderer);
Rectangle(int x, int y);
Rectangle(int x, int y, int w, int h);
Rectangle(int x, int y, int w, int h, float ang);
Rectangle(int x, int y, int w, int h, int r, int g, int b);
void setColor(int r, int g, int b);
void setColor(int r, int g, int b, int a);
void setAngle(float ang);
void setPosition(int x, int y);
void setDimensions(int w, int h);
SDL_Rect getRect() { return rect; }
SDL_Point getPosition() { return position; }
SDL_Color getColor() { return color; }
float getAngle() { return angle; }
SDL_Point getDimensions() { return dimensions; };
void render(SDL_Renderer* Renderer);
};
#endif