Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
resolution.h
1 #pragma once
2 
3 #include "util/string.h"
4 
5 namespace blowbox
6 {
12  struct Resolution
13  {
18  Resolution();
19 
26  Resolution(int width, int height);
27 
32  float GetAspectRatio();
33 
37  String ToString();
38 
39  int width;
40  int height;
41  };
42 }
String ToString()
Converts this resolution to a printable string.
Definition: resolution.cc:28
float GetAspectRatio()
Calculates the aspect ratio of this resolution.
Definition: resolution.cc:22
eastl::string String
Typedef for wrapping the EASTL string.
Definition: string.h:13
Stores resolution information in pixels.
Definition: resolution.h:12
int height
The height of the resolution.
Definition: resolution.h:40
The main Blowbox namespace.
Definition: image.cc:8
int width
The width of the resolution.
Definition: resolution.h:39
Resolution()
Constructs an empty resolution (0, 0)
Definition: resolution.cc:6