Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
cinder::Display Class Reference

#include <Display.h>

Public Member Functions

 ~Display ()
 
int getWidth () const
 Returns the width of the screen measured in points. More...
 
int getHeight () const
 Returns the height of the screen measured in points. More...
 
Vec2i getSize () const
 Returns the size of the Display measured in points. More...
 
float getAspectRatio () const
 Returns the Display aspect ratio, which is its width / height. More...
 
Area getBounds () const
 Returns the bounding Area of the Display in points, measured relative to primary display's upper-left corner. More...
 
Vec2i getSystemCoordinate (const Vec2i &displayRelativeCoordinate) const
 Returns the system position (relative to the system's primary display's upper-left corner) of a Display-relative displayRelativeCoordinate. The results are suitable for use with app::Window's position functions. More...
 
int getBitsPerPixel () const
 Returns the bits per pixel for the display. Typically 24 bits. More...
 
float getContentScale () const
 Returns the factor which multiplies points to pixels. 2.0f for high-density (Retina) displays; 1.0f for others. More...
 
bool contains (const Vec2i &pt) const
 Returns whether the Display's coordinates contain pt. More...
 

Static Public Member Functions

static DisplayRef getMainDisplay ()
 Returns the system's primary display. More...
 
static const std::vector
< DisplayRef > & 
getDisplays ()
 Returns a vector of all displays connected to the system. More...
 
static DisplayRef getDisplayForPoint (const Vec2i &pt)
 Returns the Display which contains a given point, measured relative to the upper-left corner of the primary display. Returns a NULL DisplayRef on failure. More...
 
static Area getSpanningArea ()
 Returns the Area which spans all Displays. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Display &display)
 

Constructor & Destructor Documentation

cinder::Display::~Display ( )

Member Function Documentation

int cinder::Display::getWidth ( ) const

Returns the width of the screen measured in points.

int cinder::Display::getHeight ( ) const

Returns the height of the screen measured in points.

Vec2i cinder::Display::getSize ( ) const

Returns the size of the Display measured in points.

float cinder::Display::getAspectRatio ( ) const

Returns the Display aspect ratio, which is its width / height.

Area cinder::Display::getBounds ( ) const

Returns the bounding Area of the Display in points, measured relative to primary display's upper-left corner.

Vec2i cinder::Display::getSystemCoordinate ( const Vec2i displayRelativeCoordinate) const

Returns the system position (relative to the system's primary display's upper-left corner) of a Display-relative displayRelativeCoordinate. The results are suitable for use with app::Window's position functions.

int cinder::Display::getBitsPerPixel ( ) const

Returns the bits per pixel for the display. Typically 24 bits.

float cinder::Display::getContentScale ( ) const

Returns the factor which multiplies points to pixels. 2.0f for high-density (Retina) displays; 1.0f for others.

bool cinder::Display::contains ( const Vec2i pt) const

Returns whether the Display's coordinates contain pt.

DisplayRef cinder::Display::getMainDisplay ( )
static

Returns the system's primary display.

const vector< DisplayRef > & cinder::Display::getDisplays ( )
static

Returns a vector of all displays connected to the system.

DisplayRef cinder::Display::getDisplayForPoint ( const Vec2i pt)
static

Returns the Display which contains a given point, measured relative to the upper-left corner of the primary display. Returns a NULL DisplayRef on failure.

Area cinder::Display::getSpanningArea ( )
static

Returns the Area which spans all Displays.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Display display 
)
friend

The documentation for this class was generated from the following files: