Add wxDisplay::GetScaleFactor()

This is conceptually the same as the ratio of the current DPI to the
standard one, but can be implemented more directly for wxGTK3 and wxOSX
(although the latter doesn't implement it yet).
This commit is contained in:
Vadim Zeitlin
2020-08-07 00:10:22 +02:00
parent e902050002
commit 19fd0fcfd7
3 changed files with 35 additions and 0 deletions

View File

@@ -143,6 +143,19 @@ public:
*/
wxSize GetPPI() const;
/**
Returns scaling factor used by this display.
The scaling factor is the ratio between GetPPI() and GetStdPPI()
(it is implicitly assumed that this ratio is the same for both
horizontal and vertical components).
@see wxWindow::GetContentScaleFactor(), wxWindow::GetDPIScaleFactor()
@since 3.1.5
*/
double GetScaleFactor() const;
/**
Returns default display resolution for the current platform in pixels
per inch.