Take HiDPI scale into account for wxGCDC 0-width pen

See #19077, #19115
This commit is contained in:
Paul Cornett
2021-04-03 13:03:56 -07:00
parent 5628a4a334
commit 334cf1cc91

View File

@@ -534,7 +534,7 @@ void wxGCDCImpl::SetPen( const wxPen &pen )
// 0-width pen is 1 pixel wide with MSW wxDC // 0-width pen is 1 pixel wide with MSW wxDC
const int w = pen.GetWidth(); 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); wxGraphicsPenInfo info(pen.GetColour(), width, style);
info.Join(pen.GetJoin()).Cap(pen.GetCap()); info.Join(pen.GetJoin()).Cap(pen.GetCap());