NAP
Public Member Functions | List of all members
Display Class Referencefinal

#include <renderservice.h>

Public Member Functions

 Display (int index)
 
int getIndex () const
 
float getDiagonalDPI () const
 
float getHorizontalDPI () const
 
float getVerticalDPI () const
 
const std::string & getName () const
 
const glm::ivec2 & getMin () const
 
const glm::ivec2 & getMax () const
 
math::Rect getBounds () const
 
bool isValid () const
 
std::string toString () const
 
bool operator== (const Display &rhs) const
 
bool operator!= (const Display &rhs) const
 

Description

Groups together important display information

Constructor & Destructor Documentation

◆ Display()

Display ( int  index)

Extracts display information. Index must be >= 0 && < SDL::getDisplayCount()

Parameters
indexdisplay index

Member Function Documentation

◆ getBounds()

math::Rect getBounds ( ) const
Returns
desktop area of this display, with the primary display located at 0,0

◆ getDiagonalDPI()

float getDiagonalDPI ( ) const

Returns diagonal dots per inch. 0 if diagonal DPI not available.

Returns
diagonal dots per inch. 0 if diagonal DPI not available.

◆ getHorizontalDPI()

float getHorizontalDPI ( ) const

Returns horizontal dots per inch. 0 if horizontal DPI not available.

Returns
horizontal dots per inch. 0 if horizontal DPI not available.

◆ getIndex()

int getIndex ( ) const
Returns
display index

◆ getMax()

const glm::ivec2& getMax ( ) const
Returns
max location of desktop area of this display, with the primary display located at 0,0

◆ getMin()

const glm::ivec2& getMin ( ) const
Returns
min location of desktop area of this display, with the primary display located at 0,0

◆ getName()

const std::string& getName ( ) const

Returns display name, empty if not available.

Returns
display name, empty if not available.

◆ getVerticalDPI()

float getVerticalDPI ( ) const

Returns vertical dots per inch. 0 if vertical DPI not available.

Returns
vertical dots per inch. 0 if vertical DPI not available.

◆ isValid()

bool isValid ( ) const

Returns if this display has valid bounds.

Returns
if this display has valid bounds.

◆ operator!=()

bool operator!= ( const Display rhs) const
Returns
if two displays values are not the same based on hardware index

◆ operator==()

bool operator== ( const Display rhs) const
Returns
if two displays are the same based on hardware index.

◆ toString()

std::string toString ( ) const
Returns
human readable string