UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
texturedrectangle.h
Go to the documentation of this file.
1 #ifndef UGDK_UI_DRAWABLE_TEXTUREDRECTANGLE_H_
2 #define UGDK_UI_DRAWABLE_TEXTUREDRECTANGLE_H_
3 
4 #include <ugdk/graphic.h>
5 #include <ugdk/ui/drawable.h>
7 
8 namespace ugdk {
9 namespace ui {
10 
11 class TexturedRectangle : public Drawable {
12  public:
13  TexturedRectangle(const graphic::GLTexture* texture);
14  TexturedRectangle(const graphic::GLTexture* texture, const math::Vector2D& _size);
16 
17  void Draw(graphic::Canvas& canvas) const override;
18 
19  const math::Vector2D& size() const override {
20  return size_;
21  }
22 
23  private:
24  math::Vector2D size_;
25  graphic::VertexData data_;
26  const graphic::GLTexture* texture_;
27 };
28 
29 } // namespace ui
30 } // namespace ugdk
31 
32 #endif // UGDK_UI_DRAWABLE_TEXTUREDRECTANGLE_H_
Definition: canvas.h:28
Definition: vector2D.h:18
Definition: animation.h:11
Definition: vertexdata.h:20
Definition: texturedrectangle.h:11
Definition: drawable.h:13
const math::Vector2D & size() const override
Definition: texturedrectangle.h:19
TexturedRectangle(const graphic::GLTexture *texture)
void Draw(graphic::Canvas &canvas) const override