2011-04-08 20:29:59 +02:00
|
|
|
#ifndef IMAGE_H
|
|
|
|
#define IMAGE_H
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
#include "graphicsdeclarations.h"
|
|
|
|
#include <otml/otmldeclarations.h>
|
2011-04-08 20:29:59 +02:00
|
|
|
|
|
|
|
class Image
|
|
|
|
{
|
|
|
|
public:
|
2011-08-14 04:09:11 +02:00
|
|
|
Image(TexturePtr texture, Rect textureCoords = Rect());
|
|
|
|
|
|
|
|
static ImagePtr loadFromOTML(const OTMLNodePtr& imageNode);
|
2011-04-08 20:29:59 +02:00
|
|
|
|
|
|
|
virtual void draw(const Rect& screenCoords);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
TexturePtr m_texture;
|
|
|
|
Rect m_textureCoords;
|
|
|
|
};
|
|
|
|
|
2011-08-14 04:09:11 +02:00
|
|
|
#endif
|