From 334cf1cc91769df301fdc52834eac3cb87ad3a4c Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 3 Apr 2021 13:03:56 -0700 Subject: [PATCH] Take HiDPI scale into account for wxGCDC 0-width pen See #19077, #19115 --- src/common/dcgraph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index c98d8f7394..ea4af48ceb 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -534,7 +534,7 @@ void wxGCDCImpl::SetPen( const wxPen &pen ) // 0-width pen is 1 pixel wide with MSW wxDC const int w = pen.GetWidth(); - const double width = w ? double(w) : 1 / wxMin(m_scaleX, m_scaleY); + const double width = w ? double(w) : 1 / (wxMin(m_scaleX, m_scaleY) * m_contentScaleFactor); wxGraphicsPenInfo info(pen.GetColour(), width, style); info.Join(pen.GetJoin()).Cap(pen.GetCap());