Add wxDisplay::GetStdPPIValue() and GetStdPPI()
Provide public way to access the default platform DPI, which was previously a constant private to src/common/wincmn.cpp.
This commit is contained in:
@@ -143,6 +143,33 @@ public:
|
||||
*/
|
||||
wxSize GetPPI() const;
|
||||
|
||||
/**
|
||||
Returns default display resolution for the current platform in pixels
|
||||
per inch.
|
||||
|
||||
This function mostly used internally, use GetPPI() to get the actual
|
||||
display resolution.
|
||||
|
||||
Currently the standard PPI is the same in both horizontal and vertical
|
||||
directions on all platforms and its value is 96 everywhere except under
|
||||
Apple devices (those running macOS, iOS, watchOS etc), where it is 72.
|
||||
|
||||
@see GetStdPPI()
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
static int GetStdPPIValue();
|
||||
|
||||
/**
|
||||
Returns default display resolution for the current platform as wxSize.
|
||||
|
||||
This function is equivalent to constructing wxSize object with both
|
||||
components set to GetStdPPIValue().
|
||||
|
||||
@since 3.1.5
|
||||
*/
|
||||
static wxSize GetStdPPI();
|
||||
|
||||
/**
|
||||
Returns @true if the display is the primary display. The primary
|
||||
display is the one whose index is 0.
|
||||
|
Reference in New Issue
Block a user