From 5e7b08f9ea996fcb9e718b8dd0a5eb01b6d2e6e3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 13 Apr 2023 15:07:32 +0200 Subject: [PATCH] Correct wxDC::GetContentScaleFactor() documentation Document that it returns the same value as GetDPIScaleFactor() wxWindow method and _not_ the wxWindow method with the same name. This is very confusing, but there doesn't seem to be anything to be done about it by now. See #23441. --- interface/wx/dc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interface/wx/dc.h b/interface/wx/dc.h index 8095d867cd..92b4c6791e 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -1511,10 +1511,16 @@ public: /** Returns the factor used for converting logical pixels to physical ones. - Returns the same value as wxWindow::GetContentScaleFactor() for the + Returns the same value as wxWindow::GetDPIScaleFactor() for the device contexts associated with a window and the same value as wxBitmap::GetScaleFactor() for the associated bitmap for wxMemoryDC. + @note Beware, this function does _not_ return the same value as + wxWindow::GetContentScaleFactor() for the device contexts associated + with the window. Unlike wxWindow method, it always returns the + effective scale factor instead of always returning 1 on platforms where + logical pixels are the same as physical ones, such as MSW. + @since 2.9.5 */ double GetContentScaleFactor() const;