-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrame.cpp
More file actions
40 lines (33 loc) · 706 Bytes
/
Frame.cpp
File metadata and controls
40 lines (33 loc) · 706 Bytes
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
#include "Frame.hpp"
// Par défaut
Frame::Frame(const sf::Color& NewColor)
{
Image = NULL;
Color = NewColor;
}
// Par copie
Frame::Frame(const Frame& Cpy)
{
Image = Cpy.Image;
Rect = Cpy.Rect;
Color = Cpy.Color;
}
// Image et Rect
Frame::Frame(sf::Image* NewImage, const sf::Rect<int>& NewRect, const sf::Color& NewColor)
{
Image = NewImage;
Rect = NewRect;
Color = NewColor;
}
// Image (Le Rect est au dimension de l'image)
Frame::Frame(sf::Image* NewImage, const sf::Color& NewColor)
{
Image = NewImage;
if (Image != NULL)
Rect = sf::Rect<int>(0, 0, Image->GetWidth(), Image->GetHeight());
Color = NewColor;
}
// destructeur
Frame::~Frame()
{
}