All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ScreenProperties.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Rendering.h"
6 
7 
8 namespace Eegeo
9 {
10  namespace Rendering
11  {
13  {
14  static ScreenProperties Make(float screenWidth, float screenHeight, float pixelScale, float screenDpi);
15 
16  static ScreenProperties Make(float screenWidth, float screenHeight, float pixelScale, float screenDpi, float screenOversampleScale);
17 
19  : m_screenWidth(0.f)
20  , m_screenHeight(0.f)
21  , m_screenPixelScale(0.f)
22  , m_screenDpi(0.f)
23  , m_screenOversampleScale(0.f)
24  {
25  }
26 
27  ScreenProperties(float screenWidth, float screenHeight, float pixelScale, float screenDpi, float screenOversampleScale = 1.f)
28  : m_screenWidth(screenWidth)
29  , m_screenHeight(screenHeight)
30  , m_screenPixelScale(pixelScale)
31  , m_screenDpi(screenDpi)
32  , m_screenOversampleScale(screenOversampleScale)
33  {
34  }
35 
36  float GetScreenWidth() const { return m_screenWidth; }
37  float GetScreenHeight() const { return m_screenHeight; }
38  float GetPixelScale() const { return m_screenPixelScale; }
39  float GetScreenDpi() const { return m_screenDpi; }
40  float GetOversampleScale() const { return m_screenOversampleScale; }
41  private:
42  float m_screenWidth;
43  float m_screenHeight;
44  float m_screenPixelScale;
45  float m_screenDpi;
46  float m_screenOversampleScale;
47  };
48  }
49 }