Add wxDisplay::GetPPI() to use instead of wxGetDisplayPPI()

While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
This commit is contained in:
Vadim Zeitlin
2018-10-06 23:21:45 +02:00
parent e3e883bbd2
commit ded2894b78
24 changed files with 290 additions and 107 deletions

View File

@@ -12,8 +12,6 @@
@library{wxcore}
@category{cfg}
@see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
*/
class wxDisplay
{
@@ -109,6 +107,19 @@ public:
*/
wxString GetName() const;
/**
Returns display resolution in pixels per inch.
Horizontal and vertical resolution are returned in @c x and @c y
components of the wxSize object respectively.
If the resolution information is not available, returns @code wxSize(0,
0) @endcode.
@since 3.1.2
*/
wxSize GetPPI() const;
/**
Returns @true if the display is the primary display. The primary
display is the one whose index is 0.