blip
0.1
|
A utility object with methods for converting between pixel units based on a given screen density. More...
#include <DisplayMetrics.hpp>
Public Member Functions | |
DisplayMetrics (ScreenDensity density=ScreenDensity_Default) throw () | |
Construct a new DisplayMetrics object for the given screen density. More... | |
~DisplayMetrics () throw () | |
Destructor. More... | |
int | dipToPixels (int dip) const throw () |
Convert device-independent pixels to physical pixels. More... | |
int | pointsToPixels (int points) const throw () |
Convert points to physical pixels. More... | |
ScreenDensity | getScreenDensity () const throw () |
Get the screen density. More... | |
Static Public Attributes | |
static const int | DEFAULT_DENSITY = 160 |
The reference density. More... | |
A utility object with methods for converting between pixel units based on a given screen density.
DisplayMetrics | ( | ScreenDensity | density = ScreenDensity_Default | ) | |
throw | ( | ||||
) |
Construct a new DisplayMetrics object for the given screen density.
~DisplayMetrics | ( | ) | ||
throw | ( | |||
) |
Destructor.
int dipToPixels | ( | int | dip | ) | const |
throw | ( | ||||
) |
Convert device-independent pixels to physical pixels.
|
inline |
Get the screen density.
int pointsToPixels | ( | int | points | ) | const |
throw | ( | ||||
) |
Convert points to physical pixels.
|
static |
The reference density.
(160 dpi).