Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::system::DisplayMode Class Reference

A class that encapsulates a single possible configuration for a system video display. More...

#include <omDisplayMode.h>

Public Member Functions

 DisplayMode ()
 Create a default display mode with (0,0) size and 0 refresh rate. More...
 
 DisplayMode (const math::Size2D &newSize, Double newRefreshRate, Size newBitsPerPixel)
 Create a new display mode object with the specified size, refresh rate, and bits per pixel. More...
 
Size getWidth () const
 Return the horizontal size of this display mode in pixels. More...
 
Size getHeight () const
 Return the vertical size of this display mode in pixels. More...
 
math::Size2D getSize () const
 Return a 2D vector representing the horizontal and vertical size of this display mode in pixels. More...
 
void setWidth (Size width)
 Set the horizontal size of this display mode in pixels. More...
 
void setHeight (Size height)
 Set the vertical size of this display mode in pixels. More...
 
void setSize (Size width, Size height)
 Set the horizontal and vertical size of this display mode in pixels. More...
 
void setSize (const math::Size2D &newSize)
 Set the horizontal and vertical size of this display mode in pixels. More...
 
Double getRefreshRate () const
 Return the refresh rate of this display mode in cycles per second (hertz). More...
 
void setRefreshRate (Double newRefreshRate)
 Set the refresh rate of this display mode in cycles per second (hertz). More...
 
Size getBitsPerPixel () const
 Return the number of bits used to represent each pixel of this display mode. More...
 
void setBitsPerPixel (Size newBitsPerPixel)
 Set the number of bits used to represent each pixel of this display mode. More...
 
Bool operator== (const DisplayMode &other) const
 Return whether or not this display mode is equivalent to another. More...
 
Bool operator!= (const DisplayMode &other) const
 Return whether or not this display mode is not equivalent to another. More...
 

Detailed Description

A class that encapsulates a single possible configuration for a system video display.

A display mode configuration contains information related to a particular mode of operation for a physical video display. This information includes the size of the display in pixels (width and height), the refresh rate, and the pixel type (color depth) for the display.

Constructor & Destructor Documentation

om::system::DisplayMode::DisplayMode ( )
inline

Create a default display mode with (0,0) size and 0 refresh rate.

om::system::DisplayMode::DisplayMode ( const math::Size2D newSize,
Double  newRefreshRate,
Size  newBitsPerPixel 
)
inline

Create a new display mode object with the specified size, refresh rate, and bits per pixel.

Member Function Documentation

Size om::system::DisplayMode::getWidth ( ) const
inline

Return the horizontal size of this display mode in pixels.

Size om::system::DisplayMode::getHeight ( ) const
inline

Return the vertical size of this display mode in pixels.

math::Size2D om::system::DisplayMode::getSize ( ) const
inline

Return a 2D vector representing the horizontal and vertical size of this display mode in pixels.

void om::system::DisplayMode::setWidth ( Size  width)
inline

Set the horizontal size of this display mode in pixels.

void om::system::DisplayMode::setHeight ( Size  height)
inline

Set the vertical size of this display mode in pixels.

void om::system::DisplayMode::setSize ( Size  width,
Size  height 
)
inline

Set the horizontal and vertical size of this display mode in pixels.

void om::system::DisplayMode::setSize ( const math::Size2D newSize)
inline

Set the horizontal and vertical size of this display mode in pixels.

Double om::system::DisplayMode::getRefreshRate ( ) const
inline

Return the refresh rate of this display mode in cycles per second (hertz).

void om::system::DisplayMode::setRefreshRate ( Double  newRefreshRate)
inline

Set the refresh rate of this display mode in cycles per second (hertz).

The new refresh rate is clamped to the range of [0,+infinity].

Size om::system::DisplayMode::getBitsPerPixel ( ) const
inline

Return the number of bits used to represent each pixel of this display mode.

void om::system::DisplayMode::setBitsPerPixel ( Size  newBitsPerPixel)
inline

Set the number of bits used to represent each pixel of this display mode.

Bool om::system::DisplayMode::operator== ( const DisplayMode other) const
inline

Return whether or not this display mode is equivalent to another.

Bool om::system::DisplayMode::operator!= ( const DisplayMode other) const
inline

Return whether or not this display mode is not equivalent to another.


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