adding ContentScaleFactor support to dc - defaulting to 1.0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -521,6 +521,8 @@ public:
|
|||||||
|
|
||||||
// this needs to overidden if the axis is inverted
|
// this needs to overidden if the axis is inverted
|
||||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
||||||
|
|
||||||
|
virtual double GetContentScaleFactor() const { return m_contentScaleFactor; }
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// Native Windows functions using the underlying HDC don't honour GDI+
|
// 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
|
double m_scaleX, m_scaleY; // calculated from logical scale and user scale
|
||||||
|
|
||||||
int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes
|
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?
|
// what is a mm on a screen you don't know the size of?
|
||||||
double m_mm_to_pix_x,
|
double m_mm_to_pix_x,
|
||||||
@@ -830,6 +834,9 @@ public:
|
|||||||
virtual int GetResolution() const
|
virtual int GetResolution() const
|
||||||
{ return m_pimpl->GetResolution(); }
|
{ return m_pimpl->GetResolution(); }
|
||||||
|
|
||||||
|
double GetContentScaleFactor() const
|
||||||
|
{ return m_pimpl->GetContentScaleFactor(); }
|
||||||
|
|
||||||
// Right-To-Left (RTL) modes
|
// Right-To-Left (RTL) modes
|
||||||
|
|
||||||
void SetLayoutDirection(wxLayoutDirection dir)
|
void SetLayoutDirection(wxLayoutDirection dir)
|
||||||
|
@@ -338,6 +338,7 @@ wxDCImpl::wxDCImpl( wxDC *owner )
|
|||||||
, m_userScaleX(1.0), m_userScaleY(1.0)
|
, m_userScaleX(1.0), m_userScaleY(1.0)
|
||||||
, m_scaleX(1.0), m_scaleY(1.0)
|
, m_scaleX(1.0), m_scaleY(1.0)
|
||||||
, m_signX(1), m_signY(1)
|
, m_signX(1), m_signY(1)
|
||||||
|
, m_contentScaleFactor(1)
|
||||||
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
|
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
|
||||||
, m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
|
, m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
|
||||||
, m_logicalFunction(wxCOPY)
|
, m_logicalFunction(wxCOPY)
|
||||||
|
Reference in New Issue
Block a user