]> git.localhorst.tv Git - l2e.git/blob - src/graphics/Texture.h
3b6357eef477525f2b9632ca3bc8b0be291eb6da
[l2e.git] / src / graphics / Texture.h
1 /*
2  * Texture.h
3  *
4  *  Created on: Oct 21, 2012
5  *      Author: holy
6  */
7
8 #ifndef GRAPHICS_TEXTURE_H_
9 #define GRAPHICS_TEXTURE_H_
10
11 #include "../geometry/Vector.h"
12
13 #include <SDL.h>
14
15 namespace graphics {
16
17 class Texture {
18
19 public:
20         Texture();
21         ~Texture();
22
23 public:
24         void Render(SDL_Surface *dest, const geometry::Vector<int> &from, const geometry::Vector<int> &to) const;
25
26 public:
27         void SetSurface(SDL_Surface *s) { surface = s; }
28         void SetOffset(const geometry::Vector<int> &o) { offset = o; }
29         void SetSize(const geometry::Vector<int> &s) { size = s; }
30
31 private:
32         SDL_Surface *surface;
33         geometry::Vector<int> offset;
34         geometry::Vector<int> size;
35
36 };
37
38 }
39
40 #endif /* GRAPHICS_TEXTURE_H_ */