From 3da3103eb5c8b38ef696c542a7adcfbf1b43151b Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 20 Apr 2022 20:23:37 +0200 Subject: [PATCH] Override FromDIP in wxSVGFileDC and wxPostScriptDC These are DPI independent. --- include/wx/dcsvg.h | 5 +++++ include/wx/generic/dcpsg.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/wx/dcsvg.h b/include/wx/dcsvg.h index 16cbd185ba..91e04c4449 100644 --- a/include/wx/dcsvg.h +++ b/include/wx/dcsvg.h @@ -248,6 +248,11 @@ private: virtual wxSize GetPPI() const wxOVERRIDE; + virtual wxSize FromDIP(const wxSize& sz) const wxOVERRIDE + { + return sz; + } + void Init(const wxString& filename, int width, int height, double dpi, const wxString& title); diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 21c615781d..45628064ba 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -76,6 +76,11 @@ public: // Resolution in pixels per logical inch wxSize GetPPI() const wxOVERRIDE; + virtual wxSize FromDIP(const wxSize& sz) const wxOVERRIDE + { + return sz; + } + virtual void ComputeScaleAndOrigin() wxOVERRIDE; void SetBackgroundMode(int WXUNUSED(mode)) wxOVERRIDE { }