add basic image loading
[exterlulz-musk.git] / musk / image.h
blob192bb7f4375f39d3457ab00631e6361a9c4efeb2
1 #ifndef MUSK_IMAGE_H_
2 #define MUSK_IMAGE_H_
4 #include <SDL/SDL.h>
6 #include <string>
7 #include <utility>
9 namespace musk {
11 // typedef std::pair<int32_t, int32_t> Position;
13 class Image
15 public:
16 Image(const std::string& path);
17 ~Image();
19 virtual int width() const;
20 virtual int height() const;
22 const std::pair<int32_t, int32_t> position() const;
23 void setPosition(const std::pair<int32_t, int32_t>& position);
25 // TODO: set a scene in the constructor, and draw into that scene
26 void draw(SDL_Surface *dest) const;
28 protected:
29 SDL_Surface *surface_;
30 SDL_Rect clipMask_;
32 std::pair<int32_t, int32_t> position_;
35 } // namespace musk
37 #endif // MUSK_IMAGE_H_