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:
@@ -91,9 +91,15 @@ void PDF_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData )
|
||||
{
|
||||
wxASSERT( workFile );
|
||||
|
||||
if( aWidth == 0 )
|
||||
if( aWidth == DO_NOT_SET_LINE_WIDTH )
|
||||
return;
|
||||
else if( aWidth == USE_DEFAULT_LINE_WIDTH )
|
||||
aWidth = m_renderSettings->GetDefaultPenWidth();
|
||||
else if( aWidth == 0 )
|
||||
aWidth = 1;
|
||||
|
||||
wxASSERT_MSG( aWidth > 0, "Plotter called to set negative pen width" );
|
||||
|
||||
if( aWidth != currentPenWidth )
|
||||
fprintf( workFile, "%g w\n", userToDeviceSize( aWidth ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user