UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
texturedrectangle.h
Go to the documentation of this file.
1 #ifndef UGDK_GRAPHIC_DRAWABLE_TEXTUREDRECTANGLE_H_
2 #define UGDK_GRAPHIC_DRAWABLE_TEXTUREDRECTANGLE_H_
3 
4 #include <ugdk/base/types.h>
5 #include <ugdk/graphic.h>
7 
8 namespace ugdk {
9 namespace graphic {
10 
11 class TexturedRectangle : public Shape {
12  public:
13  TexturedRectangle(Texture* texture);
14  TexturedRectangle(Texture* texture, const Vector2D& size);
16 
17  void Update(double dt);
18  void Draw() const;
19 
20  const Vector2D& size() const { return size_; }
21  void set_size(const Vector2D& size) { size_ = size; }
22 
23  private:
24  Vector2D size_;
25  Texture* texture_;
26 };
27 
28 } // namespace graphic
29 } // namespace ugdk
30 
31 #endif