Pcbnew: simplify draw code in default canvas and plot functions by removing the plot LINE option, which is not existing in all plotters, not existing in opengl/cairo canvas, and not usefull in default canvas.

This commit is contained in:
jean-pierre charras
2015-02-02 09:06:39 +01:00
parent 2ff623dcb9
commit b1cd42cf08
40 changed files with 1741 additions and 2068 deletions
+8 -14
View File
@@ -432,19 +432,16 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_
wxASSERT( outputFile );
wxSize size( diametre, diametre );
switch( trace_mode )
if( trace_mode == SKETCH )
{
case LINE:
case SKETCH:
SetCurrentLineWidth( -1 );
Circle( pos, diametre - currentPenWidth, NO_FILL );
break;
case FILLED:
}
else
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
selectAperture( size, APERTURE::Circle );
emitDcode( pos_dev, 3 );
break;
}
}
@@ -519,23 +516,20 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
// Pass through
case 0:
case 1800:
switch( trace_mode )
if( trace_mode == SKETCH )
{
case LINE:
case SKETCH:
SetCurrentLineWidth( -1 );
Rect( wxPoint( pos.x - (size.x - currentPenWidth) / 2,
pos.y - (size.y - currentPenWidth) / 2 ),
wxPoint( pos.x + (size.x - currentPenWidth) / 2,
pos.y + (size.y - currentPenWidth) / 2 ),
NO_FILL );
break;
case FILLED:
}
else
{
DPOINT pos_dev = userToDeviceCoordinates( pos );
selectAperture( size, APERTURE::Rect );
emitDcode( pos_dev, 3 );
break;
}
break;