Cinder  0.9.1
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
cinder::DisplayCocoaTouch Class Reference

#include <PlatformCocoa.h>

Inherits cinder::Display.

Public Member Functions

 DisplayCocoaTouch (UIScreen *screen)
 
 ~DisplayCocoaTouch ()
 
UIScreen * getUiScreen () const
 
const std::vector< ivec2 > & getSupportedResolutions () const
 
void setResolution (const ivec2 &resolution)
 
int getWidth () const
 
int getHeight () const
 
ivec2 getSize () const
 
float getAspectRatio () const
 
Area getBounds () const
 
ivec2 getSystemCoordinate (const ivec2 &displayRelativeCoordinate) const
 
int getBitsPerPixel () const
 
float getContentScale () const
 
bool contains (const ivec2 &pt) const
 
virtual std::string getName () const
 

Static Public Member Functions

static DisplayRef getMainDisplay ()
 
static const std::vector< DisplayRef > & getDisplays ()
 
static DisplayRef getDisplayForPoint (const ivec2 &pt)
 
static Area getSpanningArea ()
 

Protected Attributes

UIScreen * mUiScreen
 
std::vector< ivec2 > mSupportedResolutions
 
Area mArea
 
int mBitsPerPixel
 
float mContentScale
 
std::string mName
 
bool mNameDirty
 

Detailed Description

Represents a monitor/display on iOS.

Constructor & Destructor Documentation

cinder::DisplayCocoaTouch::DisplayCocoaTouch ( UIScreen *  screen)
cinder::DisplayCocoaTouch::~DisplayCocoaTouch ( )

Member Function Documentation

UIScreen* cinder::DisplayCocoaTouch::getUiScreen ( ) const
const std::vector<ivec2>& cinder::DisplayCocoaTouch::getSupportedResolutions ( ) const

Returns a vector of resolutions the Display supports.

void cinder::DisplayCocoaTouch::setResolution ( const ivec2 &  resolution)

Sets the resolution of the Display. Rounds to the nearest supported resolution.

int cinder::Display::getWidth ( ) const
inherited

Returns the width of the screen measured in points.

int cinder::Display::getHeight ( ) const
inherited

Returns the height of the screen measured in points.

ivec2 cinder::Display::getSize ( ) const
inherited

Returns the size of the Display measured in points.

float cinder::Display::getAspectRatio ( ) const
inherited

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

Area cinder::Display::getBounds ( ) const
inherited

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

ivec2 cinder::Display::getSystemCoordinate ( const ivec2 &  displayRelativeCoordinate) const
inherited

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
inherited

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

float cinder::Display::getContentScale ( ) const
inherited

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

bool cinder::Display::contains ( const ivec2 &  pt) const
inherited

Returns whether the Display's coordinates contain pt.

virtual std::string cinder::Display::getName ( ) const
virtualinherited

Returns the display's name or an empty string if unavailable.

Reimplemented in cinder::DisplayMsw.

DisplayRef cinder::Display::getMainDisplay ( )
staticinherited

Returns the system's primary display.

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

Returns a vector of all displays connected to the system.

DisplayRef cinder::Display::getDisplayForPoint ( const ivec2 &  pt)
staticinherited

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 ( )
staticinherited

Returns the Area which spans all Displays.

Member Data Documentation

UIScreen* cinder::DisplayCocoaTouch::mUiScreen
protected
std::vector<ivec2> cinder::DisplayCocoaTouch::mSupportedResolutions
protected
Area cinder::Display::mArea
protectedinherited
int cinder::Display::mBitsPerPixel
protectedinherited
float cinder::Display::mContentScale
protectedinherited
std::string cinder::Display::mName
mutableprotectedinherited
bool cinder::Display::mNameDirty
mutableprotectedinherited

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