X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4787c92d397bb4849b1248f5ba1875746434f4e2..8e77fd8bca165aab9709649d79a7cbc6a172d4e1:/include/wx/dc.h diff --git a/include/wx/dc.h b/include/wx/dc.h index a957b28e78..031afde7c7 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -521,6 +521,8 @@ public: // this needs to overidden if the axis is inverted virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + + virtual double GetContentScaleFactor() const { return m_contentScaleFactor; } #ifdef __WXMSW__ // Native Windows functions using the underlying HDC don't honour GDI+ @@ -747,6 +749,8 @@ protected: double m_scaleX, m_scaleY; // calculated from logical scale and user scale int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes + + double m_contentScaleFactor; // used by high resolution displays (retina) // what is a mm on a screen you don't know the size of? double m_mm_to_pix_x, @@ -830,6 +834,9 @@ public: virtual int GetResolution() const { return m_pimpl->GetResolution(); } + double GetContentScaleFactor() const + { return m_pimpl->GetContentScaleFactor(); } + // Right-To-Left (RTL) modes void SetLayoutDirection(wxLayoutDirection dir)