viewport.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef VIEWPORT_HPP
00028 #define VIEWPORT_HPP
00029
00030 #include "renderstack/rs.h"
00031
00032 namespace renderstack {
00033
00035 class viewport
00036 {
00037 public:
00038 viewport(int x = 0, int y = 0, int width = 0, int height = 0);
00039
00040 public:
00041 void set(int x, int y, int width, int height);
00042
00043 int border() const { return m_border; }
00044 float x() const { return m_x; }
00045 float y() const { return m_y; }
00046 float width() const { return m_width; }
00047 float height() const { return m_height; }
00048 float aspect_ratio() const { return m_aspect_ratio; }
00049
00050 private:
00051 int m_border;
00052 float m_x;
00053 float m_y;
00054 float m_width;
00055 float m_height;
00056 float m_aspect_ratio;
00057 };
00058
00059 }
00060
00061 #endif
00062