diff --git a/include/wx/dc.h b/include/wx/dc.h index d6c2881ef2..8a3e796114 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -539,8 +539,6 @@ public: virtual double GetContentScaleFactor() const { return m_contentScaleFactor; } - virtual double GetDPIScaleFactor() const { return 1.0; } - #ifdef __WXMSW__ // Native Windows functions using the underlying HDC don't honour GDI+ // transformations which may be applied to it. Using this function we can @@ -829,9 +827,6 @@ public: double GetContentScaleFactor() const { return m_pimpl->GetContentScaleFactor(); } - double GetDPIScaleFactor() const - { return m_pimpl->GetDPIScaleFactor(); } - // Right-To-Left (RTL) modes void SetLayoutDirection(wxLayoutDirection dir) diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h index a57e8168e1..29671a841b 100644 --- a/include/wx/dcgraph.h +++ b/include/wx/dcgraph.h @@ -101,7 +101,6 @@ public: virtual bool CanGetTextExtent() const wxOVERRIDE; virtual int GetDepth() const wxOVERRIDE; virtual wxSize GetPPI() const wxOVERRIDE; - virtual double GetDPIScaleFactor() const wxOVERRIDE; virtual void SetLogicalFunction(wxRasterOperationMode function) wxOVERRIDE; diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 849e5353e9..5defa492d9 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -880,7 +880,6 @@ public: void SetContentScaleFactor(double contentScaleFactor); double GetContentScaleFactor() const { return m_contentScaleFactor; } - double GetDPIScaleFactor() const; #ifdef __WXMSW__ virtual WXHDC GetNativeHDC() = 0; diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index ae04c80566..6af3637c97 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -77,7 +77,6 @@ public: virtual bool CanGetTextExtent() const wxOVERRIDE; virtual int GetDepth() const wxOVERRIDE; virtual wxSize GetPPI() const wxOVERRIDE; - virtual double GetDPIScaleFactor() const wxOVERRIDE; virtual void SetMapMode(wxMappingMode mode) wxOVERRIDE; virtual void SetUserScale(double x, double y) wxOVERRIDE; diff --git a/include/wx/msw/dcmemory.h b/include/wx/msw/dcmemory.h index 88547f314d..7449e27885 100644 --- a/include/wx/msw/dcmemory.h +++ b/include/wx/msw/dcmemory.h @@ -27,7 +27,6 @@ public: virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) wxOVERRIDE; virtual void DoGetSize(int* width, int* height) const wxOVERRIDE; virtual void DoSelect(const wxBitmap& bitmap) wxOVERRIDE; - virtual double GetDPIScaleFactor() const wxOVERRIDE; virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const wxOVERRIDE { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC() );} diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index 7329efa2ff..de0e63f8e1 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -574,7 +574,7 @@ void MyCanvas::DrawTestPoly(wxDC& dc) wxBrush brushHatch(*wxRED, wxBRUSHSTYLE_FDIAGONAL_HATCH); dc.SetBrush(brushHatch); - double scale = dc.GetDPIScaleFactor(); + double scale = 1.0; wxPoint star[5]; star[0] = scale * wxPoint(100, 60); diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 368ddfed83..13eb330aa1 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -490,11 +490,6 @@ wxSize wxGCDCImpl::GetPPI() const return wxDisplay::GetStdPPI(); } -double wxGCDCImpl::GetDPIScaleFactor() const -{ - return m_graphicContext ? m_graphicContext->GetDPIScaleFactor() : 1.0; -} - int wxGCDCImpl::GetDepth() const { return 32; diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index 59803b8789..1bbb3e0a65 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -613,13 +613,6 @@ void wxGraphicsContext::SetContentScaleFactor(double contentScaleFactor) m_contentScaleFactor = contentScaleFactor; } - double wxGraphicsContext::GetDPIScaleFactor() const -{ - wxDouble x, y; - GetDPI(&x, &y); - return x / (double)wxDisplay::GetStdPPIValue(); -} - #if 0 void wxGraphicsContext::SetAlpha( wxDouble WXUNUSED(alpha) ) { diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 33cc1cf537..6dbca59f88 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -2661,11 +2661,6 @@ wxSize wxMSWDCImpl::GetPPI() const return ppi; } -double wxMSWDCImpl::GetDPIScaleFactor() const -{ - return GetPPI().x / 96.0; -} - // ---------------------------------------------------------------------------- // DC caching // ---------------------------------------------------------------------------- diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 83799ff4ed..7218fa34eb 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -143,11 +143,6 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) SetFont(GetFont()); } -double wxMemoryDCImpl::GetDPIScaleFactor() const -{ - return m_contentScaleFactor; -} - void wxMemoryDCImpl::SetFont(const wxFont& font) { // We need to adjust the font size by the ratio between the scale factor we