Implement GetContentScaleFactor for wxMSWDCImpl

This commit is contained in:
Maarten Bent
2019-08-02 22:49:28 +02:00
parent e31938c314
commit b0152155c0
2 changed files with 6 additions and 0 deletions

View File

@@ -77,6 +77,7 @@ public:
virtual bool CanGetTextExtent() const wxOVERRIDE;
virtual int GetDepth() const wxOVERRIDE;
virtual wxSize GetPPI() const wxOVERRIDE;
virtual double GetContentScaleFactor() const wxOVERRIDE;
virtual void SetMapMode(wxMappingMode mode) wxOVERRIDE;

View File

@@ -2440,6 +2440,11 @@ wxSize wxMSWDCImpl::GetPPI() const
return wxSize(x, y);
}
double wxMSWDCImpl::GetContentScaleFactor() const
{
return GetPPI().y / 96.0;
}
// ----------------------------------------------------------------------------
// DC caching
// ----------------------------------------------------------------------------