From 0af8d6b95a21434cc6585fb64893ba9c7b1b82aa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 3 Apr 2021 23:03:07 +0200 Subject: [PATCH] Fix size of 0-width pen for wxPrinterDC in wxGTK Don't apply scale to the fixed line width used for 0-width pens. Closes #17056. --- src/gtk/print.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp index 8b85e1fcc7..1e758eac43 100644 --- a/src/gtk/print.cpp +++ b/src/gtk/print.cpp @@ -1950,11 +1950,11 @@ void wxGtkPrinterDCImpl::SetPen( const wxPen& pen ) double width; if (m_pen.GetWidth() <= 0) - width = 0.1; + width = 0.1; // Thin, scale-independent line. else - width = (double) m_pen.GetWidth(); + width = (double) m_pen.GetWidth() * m_scaleX; - cairo_set_line_width( m_cairo, width * m_DEV2PS * m_scaleX ); + cairo_set_line_width( m_cairo, width * m_DEV2PS ); static const double dotted[] = {2.0, 5.0}; static const double short_dashed[] = {4.0, 4.0}; static const double long_dashed[] = {4.0, 8.0};