Unify support for line width magic cookies.

They were added for the Gerber plotter but once there there's the
expectation by others that they'll work.
This commit is contained in:
Jeff Young
2020-05-13 17:56:47 +01:00
parent 9db2969911
commit bcea2019d4
5 changed files with 30 additions and 1 deletions
+4
View File
@@ -286,6 +286,10 @@ void GERBER_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData )
{
if( aWidth == DO_NOT_SET_LINE_WIDTH )
return;
else if( aWidth == USE_DEFAULT_LINE_WIDTH )
aWidth = m_renderSettings->GetDefaultPenWidth();
wxASSERT_MSG( aWidth >= 0, "Plotter called to set negative pen width" );
GBR_METADATA* gbr_metadata = static_cast<GBR_METADATA*>( aData );
int aperture_attribute = gbr_metadata ? gbr_metadata->GetApertureAttrib() : 0;