VideoMode defines a video mode (width, height, bpp, frequency) and provides static functions for getting modes supported by the display device. More...
#include <VideoMode.hpp>
Public Member Functions | |
VideoMode () | |
Default constructor. More... | |
VideoMode (unsigned int ModeWidth, unsigned int ModeHeight, unsigned int ModeBpp=32) | |
Construct the video mode with its attributes. More... | |
bool | IsValid () const |
Tell whether or not the video mode is supported. More... | |
bool | operator== (const VideoMode &Other) const |
Comparison operator overload – tell if two video modes are equal. More... | |
bool | operator!= (const VideoMode &Other) const |
Comparison operator overload – tell if two video modes are different. More... | |
Static Public Member Functions | |
static VideoMode | GetDesktopMode () |
Get the current desktop video mode. More... | |
static VideoMode | GetMode (std::size_t Index) |
Get a valid video mode Index must be in range [0, GetModesCount()[ Modes are sorted from best to worst. More... | |
static std::size_t | GetModesCount () |
Get valid video modes count. More... | |
Public Attributes | |
unsigned int | Width |
Video mode width, in pixels. More... | |
unsigned int | Height |
Video mode height, in pixels. More... | |
unsigned int | BitsPerPixel |
Video mode pixel depth, in bits per pixels. More... | |
VideoMode defines a video mode (width, height, bpp, frequency) and provides static functions for getting modes supported by the display device.
Definition at line 42 of file VideoMode.hpp.
sf::VideoMode::VideoMode | ( | ) |
Default constructor.
Definition at line 67 of file VideoMode.cpp.
sf::VideoMode::VideoMode | ( | unsigned int | ModeWidth, |
unsigned int | ModeHeight, | ||
unsigned int | ModeBpp = 32 |
||
) |
Construct the video mode with its attributes.
ModeWidth | : Width in pixels |
ModeHeight | : Height in pixels |
ModeBpp | : Pixel depths in bits per pixel (32 by default) |
Definition at line 79 of file VideoMode.cpp.
|
static |
Get the current desktop video mode.
Definition at line 91 of file VideoMode.cpp.
|
static |
Get a valid video mode Index must be in range [0, GetModesCount()[ Modes are sorted from best to worst.
Get a valid video mode Index must be in range [0, GetModesCount()[.
Index | : Index of video mode to get |
Definition at line 102 of file VideoMode.cpp.
|
static |
Get valid video modes count.
Definition at line 117 of file VideoMode.cpp.
bool sf::VideoMode::IsValid | ( | ) | const |
Tell whether or not the video mode is supported.
Definition at line 129 of file VideoMode.cpp.
bool sf::VideoMode::operator!= | ( | const VideoMode & | Other | ) | const |
Comparison operator overload – tell if two video modes are different.
Other | : Video mode to compare |
Definition at line 152 of file VideoMode.cpp.
bool sf::VideoMode::operator== | ( | const VideoMode & | Other | ) | const |
Comparison operator overload – tell if two video modes are equal.
Other | : Video mode to compare |
Definition at line 141 of file VideoMode.cpp.
unsigned int sf::VideoMode::BitsPerPixel |
Video mode pixel depth, in bits per pixels.
Definition at line 123 of file VideoMode.hpp.
unsigned int sf::VideoMode::Height |
Video mode height, in pixels.
Definition at line 122 of file VideoMode.hpp.
unsigned int sf::VideoMode::Width |
Video mode width, in pixels.
Definition at line 121 of file VideoMode.hpp.