gr_basic.cpp: ensure a pen with width = 0 is transparent.

Setting its color to COLOR4D::UNSPECIFIED (i.e. opacity = 0) is not enough
for all  platforms (i.e. Windows)
From master branch
Fixes #14915
https://gitlab.com/kicad/code/kicad/-/issues/14915
This commit is contained in:
jean-pierre charras 2023-02-21 20:06:54 +01:00
parent 1e013274c2
commit 4294202074
1 changed files with 3 additions and 0 deletions

View File

@ -94,7 +94,10 @@ void GRSetColorPen( wxDC* DC, const COLOR4D& Color, int width, wxPenStyle style
// wxWidgets will enforce a minimum pen width when printing, so we have to make the pen // 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. // transparent when we don't want the object stroked.
if( width == 0 ) if( width == 0 )
{
color = COLOR4D::UNSPECIFIED; color = COLOR4D::UNSPECIFIED;
style = wxPENSTYLE_TRANSPARENT;
}
const wxPen& curr_pen = DC->GetPen(); const wxPen& curr_pen = DC->GetPen();