Debian Codegraph @

src/effect/Picture.h

raw
1 #ifndef HEADER_PICTURE_H
2 #define HEADER_PICTURE_H
3
4 class Path;
5
6 #include "Drawable.h"
7 #include "V2.h"
8
9 /**
10 * Static picture at fixed screen position.
11 */
12 class Picture : public Drawable {
13 protected:
14 V2 m_loc;
15 SDL_Surface *m_surface;
16 public:
17 Picture(const Path &file, const V2 &loc);
18 Picture(SDL_Surface *new_surface, const V2 &loc);
19 virtual ~Picture();
20
21 int getW() const { return m_surface->w; }
22 int getH() const { return m_surface->h; }
23 virtual void drawOn(SDL_Surface *screen);
24
25 void setLoc(const V2 &loc) { m_loc = loc; }
26 void changePicture(const Path &file);
27 void changePicture(SDL_Surface *new_surface);
28 };
29
30 #endif