-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewer.h
39 lines (33 loc) · 810 Bytes
/
viewer.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
#ifndef VIEWER_H
#define VIEWER_H
#include "Rectangle.h"
#include "Square.h"
#include "ei_types.h"
#include "hw_interface.h"
#include <vector>
using namespace std;
class Viewer
{
public:
//! Constructor
Viewer(ei_size_t size);
virtual ~Viewer();
void display(ei_surface_t surface);
void updateScene();
void reshape(int w, int h);
// events
void mousePressed(int button, int action);
void mouseMoved(int x, int y);
void keyPressed(int key);
private:
ei_size_t _size;
float _scalingFactor;
bool _growing;
ei_color_t _red;
Square _square; // to add in vector
Rectangle _rectangle; //Can be replace by Square _rectangle if you want a square (Square herited of Shape)
int width;
int height;
vector<Shape> generic_shape;
};
#endif