You.i Engine
YiScreen.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_SCREEN_H_
3 #define _YI_SCREEN_H_
4 
5 #include "YiPredef.h"
6 
13 {
14 public:
15  YI_SCREEN_INFO() : nXDensity(160), nYDensity(160) // why?
16  {}
17 
18  int32_t nWidth;
19  int32_t nHeight;
20  int32_t nXDensity;
21  int32_t nYDensity;
22 };
23 
24 
25 class CYIScreen
26 {
27 public:
28  CYIScreen(int32_t nScreenSizeX, int32_t nScreenSizeY, int32_t nScreenDensityX, int32_t nScreenDensityY);
29  CYIScreen(const YI_SCREEN_INFO &rConfig);
30 
34  int32_t GetXDensity() const;
35 
39  int32_t GetYDensity() const;
40 
44  float GetWidthInches() const;
45 
49  float GetHeightInches() const;
50 
54  float GetDiagonalSizeInches() const;
55 
59  int32_t GetWidthPixels() const;
60 
64  int32_t GetHeightPixels() const;
65 
66 private:
67 
68  CYIScreen();
69 
70  int32_t m_nDisplayModeOffset; // Precalculated offset values
71  int32_t m_nDisplayModeXMVByte; // Reported TO the host system: Movement along X for the port display, including rotations
72  int32_t m_nDisplayModeYMVByte; // Reported TO the host system: Movement along Y for the port display, including rotations
73  int32_t m_nDisplayXDensity;
74  int32_t m_nDisplayYDensity;
75  int32_t m_nDisplayWidthPixels;
76  int32_t m_nDisplayHeightPixels;
77 };
78 
83 #endif // _YI_SCREEN_H_
YI_SCREEN_INFO()
Definition: YiScreen.h:15
int32_t nWidth
Definition: YiScreen.h:18
Definition: YiScreen.h:25
Definition: YiScreen.h:12
int32_t nXDensity
Definition: YiScreen.h:20
int32_t nYDensity
Definition: YiScreen.h:21
int32_t nHeight
Definition: YiScreen.h:19