Workaround wxWidgets enforced min pen width by using transparent pen.

Also fixes some bugs in our shape printing code when a border is not
specified but a fill is.

Fixes https://gitlab.com/kicad/code/kicad/issues/13891
This commit is contained in:
Jeff Young
2023-02-14 14:44:04 +00:00
parent 2b1040ae67
commit 03484aedbc
3 changed files with 119 additions and 65 deletions
+5
View File
@@ -91,6 +91,11 @@ void GRSetColorPen( wxDC* DC, const COLOR4D& Color, int width, wxPenStyle style
if( s_ForceBlackPen )
color = COLOR4D::BLACK;
// wxWidgets will enforce a minimum pen width when printing, so we have to make the pen
// transparent when we don't want the object stroked.
if( width == 0 )
color = COLOR4D::UNSPECIFIED;
const wxPen& curr_pen = DC->GetPen();
if( !curr_pen.IsOk() || curr_pen.GetColour() != color.ToColour()