Browse Source

Adding ViewPort width/height properties

Josh Engebretson 11 years ago
parent
commit
adfd35e6b2
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/Atomic/Graphics/Viewport.h

+ 4 - 0
Source/Atomic/Graphics/Viewport.h

@@ -73,6 +73,10 @@ public:
     View* GetView() const;
     View* GetView() const;
     /// Return rectangle.
     /// Return rectangle.
     const IntRect& GetRect() const { return rect_; }
     const IntRect& GetRect() const { return rect_; }
+    /// Return the viewport width
+    int GetWidth () const { return rect_.Width(); }
+    /// Return the viewport height
+    int GetHeight () const { return rect_.Height(); }
     /// Return rendering path.
     /// Return rendering path.
     RenderPath* GetRenderPath() const;
     RenderPath* GetRenderPath() const;
     /// Return whether to draw debug geometry.
     /// Return whether to draw debug geometry.