-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBox.h
45 lines (33 loc) · 1.04 KB
/
Box.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
40
41
42
43
44
45
#ifndef __BOX_H__
#define __BOX_H__
#include "Vector.h"
#include "Color.h"
namespace df {
class Box {
private:
Vector m_corner; // Upper left corner of box.
float m_horizontal; // Horizontal dimension.
float m_vertical; // Vertical dimension.
public:
// Create box with (0,0) for the corner, and 0 for horiz and vert.
Box();
// Create box with an upper-left corner, horiz and vert sizes.
Box(Vector init_corner, float init_horizontal, float init_vertical);
// Set upper left corner of box.
void setCorner(Vector new_corner);
// Get upper left corner of box.
Vector getCorner() const;
// Set horizontal size of box.
void setHorizontal(float new_horizontal);
// Get horizontal size of box.
float getHorizontal() const;
// Set vertical size of box.
void setVertical(float new_vertical);
// Get vertical size of box.
float getVertical() const;
//Draws a box
void draw(sf::Color c, bool transparentCenter);
void draw(std::string str, sf::Color c);
};
}
#endif