From e3bf5d68450e17b8c1dd096bf850e3bba7153883 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 19 Apr 2022 00:27:23 +0200 Subject: [PATCH] Document wxDC::GetContentScaleFactor() too This function existed since a long time but somehow was never documented. Also minor improvements to the just added documentation of wxDC::GetDPIScaleFactor(). --- interface/wx/dc.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/interface/wx/dc.h b/interface/wx/dc.h index a5b3a67ce5..6d1b214575 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -1504,6 +1504,17 @@ public: */ void CopyAttributes(const wxDC& dc); + /** + Returns the factor used for converting logical pixels to physical ones. + + Returns the same value as wxWindow::GetContentScaleFactor() for the + device contexts associated with a window and the same value as + wxBitmap::GetScaleFactor() for the associated bitmap for wxMemoryDC. + + @since 2.9.5 + */ + double GetContentScaleFactor() const; + /** Returns the depth (number of bits/pixel) of this DC. @@ -1551,10 +1562,15 @@ public: wxSize GetPPI() const; /** - Get the DPI scale factor. Can be used to scale coordinates and sizes - appropriate to the DPI of the associated wxWindow or wxDC. + Returns the DPI scale factor. - @since 3.1.7 + Can be used to scale coordinates and sizes appropriate to the DPI of the + associated wxWindow, if any. + + See wxWindow::GetDPIScaleFactor() for more details about the DPI scale + factor and its difference with GetContentScaleFactor(). + + @since 3.1.7 */ double GetDPIScaleFactor() const;