Commit 137066e5 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio
Browse files

Fully encapsulated with accessors PCB_PLOT_PARAMS

parent 7cef5395
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -138,11 +138,11 @@ void DIALOG_GENDRILL::InitDisplayParams()
    m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );
    m_MicroViaDrillValue->SetLabel( _( "Use Netclasses values" ) );


    msg.Empty();
    msg.Empty();
    msg << plot_opts.m_HPGLPenNum;
    msg << plot_opts.GetHPGLPenNum();
    m_PenNum->SetValue( msg );
    m_PenNum->SetValue( msg );


    msg.Empty();
    msg.Empty();
    msg << plot_opts.m_HPGLPenSpeed;
    msg << plot_opts.GetHPGLPenSpeed();
    m_PenSpeed->SetValue( msg );
    m_PenSpeed->SetValue( msg );


    // See if we have some buried vias or/and microvias, and display
    // See if we have some buried vias or/and microvias, and display
@@ -308,12 +308,12 @@ void DIALOG_GENDRILL::SetParams()
    msg = m_PenSpeed->GetValue();
    msg = m_PenSpeed->GetValue();


    if( msg.ToLong( &ltmp ) )
    if( msg.ToLong( &ltmp ) )
        plot_opts.m_HPGLPenSpeed = ltmp;
        plot_opts.SetHPGLPenSpeed( ltmp );


    msg = m_PenNum->GetValue();
    msg = m_PenNum->GetValue();


    if( msg.ToLong( &ltmp ) )
    if( msg.ToLong( &ltmp ) )
        plot_opts.m_HPGLPenNum = ltmp;
        plot_opts.SetHPGLPenNum( ltmp );


    if( m_Choice_Drill_Offset->GetSelection() == 0 )
    if( m_Choice_Drill_Offset->GetSelection() == 0 )
        m_FileDrillOffset = wxPoint( 0, 0 );
        m_FileDrillOffset = wxPoint( 0, 0 );
+3 −3
Original line number Original line Diff line number Diff line
@@ -191,9 +191,9 @@ void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
    s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
    s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
    s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()];
    s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()];


    plot_opts.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
    plot_opts.SetFineScaleAdjustX( s_Parameters.m_XScaleAdjust );
    plot_opts.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
    plot_opts.SetFineScaleAdjustY( s_Parameters.m_YScaleAdjust );
    plot_opts.m_PlotScale = s_Parameters.m_PrintScale;
    plot_opts.SetScale( s_Parameters.m_PrintScale );


    m_parent->SetPlotSettings( plot_opts );
    m_parent->SetPlotSettings( plot_opts );


+3 −3
Original line number Original line Diff line number Diff line
@@ -353,7 +353,7 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )


    int idx = m_ScaleOption->GetSelection();
    int idx = m_ScaleOption->GetSelection();
    s_Parameters.m_PrintScale =  s_ScaleList[idx];
    s_Parameters.m_PrintScale =  s_ScaleList[idx];
    plot_opts.m_PlotScale =  s_Parameters.m_PrintScale;
    plot_opts.SetScale( s_Parameters.m_PrintScale );


    if( m_FineAdjustXscaleOpt )
    if( m_FineAdjustXscaleOpt )
    {
    {
@@ -371,8 +371,8 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
        m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
        m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
    }
    }


    plot_opts.m_FineScaleAdjustX = s_Parameters.m_XScaleAdjust;
    plot_opts.SetFineScaleAdjustX( s_Parameters.m_XScaleAdjust );
    plot_opts.m_FineScaleAdjustY = s_Parameters.m_YScaleAdjust;
    plot_opts.SetFineScaleAdjustY( s_Parameters.m_YScaleAdjust );


    m_parent->SetPlotSettings( plot_opts );
    m_parent->SetPlotSettings( plot_opts );


+2 −2
Original line number Original line Diff line number Diff line
@@ -62,8 +62,8 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName,
        {
        {
            HPGL_PLOTTER* hpgl_plotter = new HPGL_PLOTTER;
            HPGL_PLOTTER* hpgl_plotter = new HPGL_PLOTTER;
            plotter = hpgl_plotter;
            plotter = hpgl_plotter;
            hpgl_plotter->SetPenNumber( plot_opts.m_HPGLPenNum );
            hpgl_plotter->SetPenNumber( plot_opts.GetHPGLPenNum() );
            hpgl_plotter->SetPenSpeed( plot_opts.m_HPGLPenSpeed );
            hpgl_plotter->SetPenSpeed( plot_opts.GetHPGLPenSpeed() );
            hpgl_plotter->SetPenOverlap( 0 );
            hpgl_plotter->SetPenOverlap( 0 );
            plotter->SetPageSettings( aSheet );
            plotter->SetPageSettings( aSheet );
            plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
            plotter->SetViewport( offset, IU_PER_DECIMILS, scale, false );
+117 −101
Original line number Original line Diff line number Diff line
@@ -73,47 +73,49 @@ static bool setInt( int* aInt, int aValue, int aMin, int aMax )
    return (temp == aValue);
    return (temp == aValue);
}
}



// PCB_PLOT_PARAMS
// PCB_PLOT_PARAMS


PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
PCB_PLOT_PARAMS::PCB_PLOT_PARAMS()
{
{
    layerSelection         = LAYER_BACK | LAYER_FRONT
    m_layerSelection       = LAYER_BACK | LAYER_FRONT
        | SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
        | SILKSCREEN_LAYER_FRONT | SILKSCREEN_LAYER_BACK;
    useGerberExtensions    = true;
    m_useGerberExtensions  = true;
    m_SkipNPTH_Pads        = false;
    m_excludeEdgeLayer     = true;
    m_ExcludeEdgeLayer     = true;
    m_lineWidth            = g_DrawDefaultLineThickness;
    m_PlotLineWidth        = g_DrawDefaultLineThickness;
    m_plotFrameRef         = false;
    m_PlotFrameRef         = false;
    m_plotViaOnMaskLayer   = false;
    m_PlotViaOnMaskLayer   = false;
    m_mode                 = FILLED;
    m_PlotMode             = FILLED;
    m_useAuxOrigin         = false;
    useAuxOrigin           = false;
    m_HPGLPenNum           = 1;
    m_HPGLPenNum           = 1;
    m_HPGLPenSpeed         = 20;        // this param is always in cm/s
    m_HPGLPenSpeed         = 20;        // this param is always in cm/s
    m_HPGLPenDiam          = 15;        // in mils
    m_HPGLPenDiam          = 15;        // in mils
    m_HPGLPenOvr           = 2;         // in mils
    m_HPGLPenOvr           = 2;         // in mils
    m_PlotPSColorOpt       = true;
    m_negative             = false;
    m_PlotPSNegative       = false;
    m_A4Output             = false;
    psA4Output             = false;
    m_plotReference        = true;
    m_PlotReference        = true;
    m_plotValue            = true;
    m_PlotValue            = true;
    m_plotOtherText        = true;
    m_PlotTextOther        = true;
    m_plotInvisibleText    = false;
    m_PlotInvisibleTexts   = false;
    m_plotPadsOnSilkLayer  = false;
    m_PlotPadsOnSilkLayer  = false;
    m_subtractMaskFromSilk = false;
    subtractMaskFromSilk   = false;
    m_format               = PLOT_FORMAT_GERBER;
    m_PlotFormat           = PLOT_FORMAT_GERBER;
    m_mirror               = false;
    m_PlotMirror           = false;
    m_drillMarks           = SMALL_DRILL_SHAPE;
    m_DrillShapeOpt        = SMALL_DRILL_SHAPE;
    m_autoScale            = false;
    m_AutoScale            = false;
    m_scale                = 1.0;
    m_PlotScale            = 1.0;
    m_scaleSelection       = 1;
    scaleSelection         = 1;
    m_fineScaleAdjustX     = 1.0;
    m_FineScaleAdjustX     = 1.0;
    m_fineScaleAdjustY     = 1.0;
    m_FineScaleAdjustY     = 1.0;
    m_widthAdjust          = 0.;
    m_FineWidthAdjust      = 0.;
    m_outputDirectory.clear();
    outputDirectory        = wxT( "" );
    m_color                = BLACK;
    m_referenceColor       = BLACK;
    m_valueColor           = BLACK;
    m_textMode		   = PLOTTEXTMODE_PHANTOM;
}
}




// PLEASE NOTE: only plot dialog options are processed
void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
                              int aNestLevel, int aControl ) const throw( IO_ERROR )
                              int aNestLevel, int aControl ) const throw( IO_ERROR )
{
{
@@ -122,21 +124,21 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,


    aFormatter->Print( aNestLevel, "(%s\n", getTokenName( T_pcbplotparams ) );
    aFormatter->Print( aNestLevel, "(%s\n", getTokenName( T_pcbplotparams ) );
    aFormatter->Print( aNestLevel+1, "(%s %ld)\n", getTokenName( T_layerselection ),
    aFormatter->Print( aNestLevel+1, "(%s %ld)\n", getTokenName( T_layerselection ),
                       layerSelection );
                       long(m_layerSelection) );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
                       useGerberExtensions ? trueStr : falseStr );
                       m_useGerberExtensions ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_excludeedgelayer ),
                       m_ExcludeEdgeLayer ? trueStr : falseStr );
                       m_excludeEdgeLayer ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_linewidth ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_linewidth ),
                       m_PlotLineWidth );
                       m_lineWidth );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotframeref ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotframeref ),
                       m_PlotFrameRef ? trueStr : falseStr );
                       m_plotFrameRef ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_viasonmask ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_viasonmask ),
                       m_PlotViaOnMaskLayer ? trueStr : falseStr );
                       m_plotViaOnMaskLayer ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_mode ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_mode ),
                       m_PlotMode );
                       m_mode );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_useauxorigin ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_useauxorigin ),
                       useAuxOrigin ? trueStr : falseStr );
                       m_useAuxOrigin ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ),
                       m_HPGLPenNum );
                       m_HPGLPenNum );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
@@ -145,34 +147,32 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
                       m_HPGLPenDiam );
                       m_HPGLPenDiam );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenoverlay ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenoverlay ),
                       m_HPGLPenOvr );
                       m_HPGLPenOvr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_pscolor ),
                       m_PlotPSColorOpt ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psnegative ),
                       m_PlotPSNegative ? trueStr : falseStr );
                       m_negative ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_psa4output ),
                       psA4Output ? trueStr : falseStr );
                       m_A4Output ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotreference ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotreference ),
                       m_PlotReference ? trueStr : falseStr );
                       m_plotReference ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotvalue ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotvalue ),
                       m_PlotValue ? trueStr : falseStr );
                       m_plotValue ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotothertext ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotothertext ),
                       m_PlotTextOther ? trueStr : falseStr );
                       m_plotOtherText ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_plotinvisibletext ),
                       m_PlotInvisibleTexts ? trueStr : falseStr );
                       m_plotInvisibleText ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_padsonsilk ),
                       m_PlotPadsOnSilkLayer ? trueStr : falseStr );
                       m_plotPadsOnSilkLayer ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_subtractmaskfromsilk ),
                       subtractMaskFromSilk ? trueStr : falseStr );
                       m_subtractMaskFromSilk ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_outputformat ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_outputformat ),
                       m_PlotFormat );
                       m_format );
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_mirror ),
    aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_mirror ),
                       m_PlotMirror ? trueStr : falseStr );
                       m_mirror ? trueStr : falseStr );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_drillshape ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_drillshape ),
                       m_DrillShapeOpt );
                       m_drillMarks );
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_scaleselection ),
    aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_scaleselection ),
                       scaleSelection );
                       m_scaleSelection );
    aFormatter->Print( aNestLevel+1, "(%s %s)", getTokenName( T_outputdirectory ),
    aFormatter->Print( aNestLevel+1, "(%s %s)", getTokenName( T_outputdirectory ),
                       aFormatter->Quotew( outputDirectory ).c_str() );
                       aFormatter->Quotew( m_outputDirectory ).c_str() );
    aFormatter->Print( 0, ")\n" );
    aFormatter->Print( 0, ")\n" );
}
}


@@ -185,21 +185,21 @@ void PCB_PLOT_PARAMS::Parse( PCB_PLOT_PARAMS_PARSER* aParser ) throw( IO_ERROR,


bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
{
{
    if( layerSelection != aPcbPlotParams.layerSelection )
    if( m_layerSelection != aPcbPlotParams.m_layerSelection )
        return false;
        return false;
    if( useGerberExtensions != aPcbPlotParams.useGerberExtensions )
    if( m_useGerberExtensions != aPcbPlotParams.m_useGerberExtensions )
        return false;
        return false;
    if( m_ExcludeEdgeLayer != aPcbPlotParams.m_ExcludeEdgeLayer )
    if( m_excludeEdgeLayer != aPcbPlotParams.m_excludeEdgeLayer )
        return false;
        return false;
    if( m_PlotLineWidth != aPcbPlotParams.m_PlotLineWidth )
    if( m_lineWidth != aPcbPlotParams.m_lineWidth )
        return false;
        return false;
    if( m_PlotFrameRef != aPcbPlotParams.m_PlotFrameRef )
    if( m_plotFrameRef != aPcbPlotParams.m_plotFrameRef )
        return false;
        return false;
    if( m_PlotViaOnMaskLayer != aPcbPlotParams.m_PlotViaOnMaskLayer )
    if( m_plotViaOnMaskLayer != aPcbPlotParams.m_plotViaOnMaskLayer )
        return false;
        return false;
    if( m_PlotMode != aPcbPlotParams.m_PlotMode )
    if( m_mode != aPcbPlotParams.m_mode )
        return false;
        return false;
    if( useAuxOrigin != aPcbPlotParams.useAuxOrigin )
    if( m_useAuxOrigin != aPcbPlotParams.m_useAuxOrigin )
        return false;
        return false;
    if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
    if( m_HPGLPenNum != aPcbPlotParams.m_HPGLPenNum )
        return false;
        return false;
@@ -209,33 +209,49 @@ bool PCB_PLOT_PARAMS::operator==( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
        return false;
        return false;
    if( m_HPGLPenOvr != aPcbPlotParams.m_HPGLPenOvr )
    if( m_HPGLPenOvr != aPcbPlotParams.m_HPGLPenOvr )
        return false;
        return false;
    if( m_PlotPSColorOpt != aPcbPlotParams.m_PlotPSColorOpt )
    if( m_negative != aPcbPlotParams.m_negative )
        return false;
    if( m_A4Output != aPcbPlotParams.m_A4Output )
        return false;
    if( m_plotReference != aPcbPlotParams.m_plotReference )
        return false;
    if( m_plotValue != aPcbPlotParams.m_plotValue )
        return false;
    if( m_plotOtherText != aPcbPlotParams.m_plotOtherText )
        return false;
    if( m_plotInvisibleText != aPcbPlotParams.m_plotInvisibleText )
        return false;
    if( m_plotPadsOnSilkLayer != aPcbPlotParams.m_plotPadsOnSilkLayer )
        return false;
    if( m_subtractMaskFromSilk != aPcbPlotParams.m_subtractMaskFromSilk )
        return false;
    if( m_format != aPcbPlotParams.m_format )
        return false;
        return false;
    if( m_PlotPSNegative != aPcbPlotParams.m_PlotPSNegative )
    if( m_mirror != aPcbPlotParams.m_mirror )
        return false;
        return false;
    if( psA4Output != aPcbPlotParams.psA4Output )
    if( m_drillMarks != aPcbPlotParams.m_drillMarks )
        return false;
        return false;
    if( m_PlotReference != aPcbPlotParams.m_PlotReference )
    if( m_scaleSelection != aPcbPlotParams.m_scaleSelection )
        return false;
        return false;
    if( m_PlotValue != aPcbPlotParams.m_PlotValue )
    if( m_autoScale != aPcbPlotParams.m_autoScale )
        return false;
        return false;
    if( m_PlotTextOther != aPcbPlotParams.m_PlotTextOther )
    if( m_scale != aPcbPlotParams.m_scale )
        return false;
        return false;
    if( m_PlotInvisibleTexts != aPcbPlotParams.m_PlotInvisibleTexts )
    if( m_fineScaleAdjustX != aPcbPlotParams.m_fineScaleAdjustX )
        return false;
        return false;
    if( m_PlotPadsOnSilkLayer != aPcbPlotParams.m_PlotPadsOnSilkLayer )
    if( m_fineScaleAdjustY != aPcbPlotParams.m_fineScaleAdjustY )
        return false;
        return false;
    if( subtractMaskFromSilk != aPcbPlotParams.subtractMaskFromSilk )
    if( m_widthAdjust != aPcbPlotParams.m_widthAdjust )
        return false;
        return false;
    if( m_PlotFormat != aPcbPlotParams.m_PlotFormat )
    if( m_color != aPcbPlotParams.m_color )
        return false;
        return false;
    if( m_PlotMirror != aPcbPlotParams.m_PlotMirror )
    if( m_referenceColor != aPcbPlotParams.m_referenceColor )
        return false;
        return false;
    if( m_DrillShapeOpt != aPcbPlotParams.m_DrillShapeOpt )
    if( m_valueColor != aPcbPlotParams.m_valueColor )
        return false;
        return false;
    if( scaleSelection != aPcbPlotParams.scaleSelection )
    if( m_textMode != aPcbPlotParams.m_textMode )
        return false;
        return false;
    if( !outputDirectory.IsSameAs( aPcbPlotParams.outputDirectory ) )
    if( !m_outputDirectory.IsSameAs( aPcbPlotParams.m_outputDirectory ) )
        return false;
        return false;
    return true;
    return true;
}
}
@@ -247,27 +263,27 @@ bool PCB_PLOT_PARAMS::operator!=( const PCB_PLOT_PARAMS &aPcbPlotParams ) const
}
}




bool PCB_PLOT_PARAMS::SetHpglPenDiameter( int aValue )
bool PCB_PLOT_PARAMS::SetHPGLPenDiameter( int aValue )
{
{
    return setInt( &m_HPGLPenDiam, aValue, HPGL_PEN_DIAMETER_MIN, HPGL_PEN_DIAMETER_MAX );
    return setInt( &m_HPGLPenDiam, aValue, HPGL_PEN_DIAMETER_MIN, HPGL_PEN_DIAMETER_MAX );
}
}




bool PCB_PLOT_PARAMS::SetHpglPenSpeed( int aValue )
bool PCB_PLOT_PARAMS::SetHPGLPenSpeed( int aValue )
{
{
    return setInt( &m_HPGLPenSpeed, aValue, HPGL_PEN_SPEED_MIN, HPGL_PEN_SPEED_MAX );
    return setInt( &m_HPGLPenSpeed, aValue, HPGL_PEN_SPEED_MIN, HPGL_PEN_SPEED_MAX );
}
}




bool PCB_PLOT_PARAMS::SetHpglPenOverlay( int aValue )
bool PCB_PLOT_PARAMS::SetHPGLPenOverlay( int aValue )
{
{
    return setInt( &m_HPGLPenOvr, aValue, HPGL_PEN_OVERLAP_MIN, HPGL_PEN_OVERLAP_MAX );
    return setInt( &m_HPGLPenOvr, aValue, HPGL_PEN_OVERLAP_MIN, HPGL_PEN_OVERLAP_MAX );
}
}




bool PCB_PLOT_PARAMS::SetPlotLineWidth( int aValue )
bool PCB_PLOT_PARAMS::SetLineWidth( int aValue )
{
{
    return setInt( &m_PlotLineWidth, aValue, PLOT_LINEWIDTH_MIN, PLOT_LINEWIDTH_MAX );
    return setInt( &m_lineWidth, aValue, PLOT_LINEWIDTH_MIN, PLOT_LINEWIDTH_MAX );
}
}




@@ -305,32 +321,32 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
            token = NextTok();
            token = NextTok();
            if( token != T_NUMBER )
            if( token != T_NUMBER )
                Expecting( T_NUMBER );
                Expecting( T_NUMBER );
            aPcbPlotParams->layerSelection = atol( CurText() );
            aPcbPlotParams->m_layerSelection = atol( CurText() );
            break;
            break;
        case T_usegerberextensions:
        case T_usegerberextensions:
            aPcbPlotParams->useGerberExtensions = ParseBool();
            aPcbPlotParams->m_useGerberExtensions = ParseBool();
            break;
            break;
        case T_psa4output:
        case T_psa4output:
            aPcbPlotParams->psA4Output = ParseBool();
            aPcbPlotParams->m_A4Output = ParseBool();
            break;
            break;
        case T_excludeedgelayer:
        case T_excludeedgelayer:
            aPcbPlotParams->m_ExcludeEdgeLayer = ParseBool();
            aPcbPlotParams->m_excludeEdgeLayer = ParseBool();
            break;
            break;
        case T_linewidth:
        case T_linewidth:
            aPcbPlotParams->m_PlotLineWidth = ParseInt( PLOT_LINEWIDTH_MIN,
            aPcbPlotParams->m_lineWidth = ParseInt( PLOT_LINEWIDTH_MIN,
                                                        PLOT_LINEWIDTH_MAX );
                                                        PLOT_LINEWIDTH_MAX );
            break;
            break;
        case T_plotframeref:
        case T_plotframeref:
            aPcbPlotParams->m_PlotFrameRef = ParseBool();
            aPcbPlotParams->m_plotFrameRef = ParseBool();
            break;
            break;
        case T_viasonmask:
        case T_viasonmask:
            aPcbPlotParams->m_PlotViaOnMaskLayer = ParseBool();
            aPcbPlotParams->m_plotViaOnMaskLayer = ParseBool();
            break;
            break;
        case T_mode:
        case T_mode:
            aPcbPlotParams->m_PlotMode = (EDA_DRAW_MODE_T)ParseInt( 0, 2 );
            aPcbPlotParams->m_mode = static_cast<EDA_DRAW_MODE_T>( ParseInt( 0, 2 ) );
            break;
            break;
        case T_useauxorigin:
        case T_useauxorigin:
            aPcbPlotParams->useAuxOrigin = ParseBool();
            aPcbPlotParams->m_useAuxOrigin = ParseBool();
            break;
            break;
        case T_hpglpennumber:
        case T_hpglpennumber:
            aPcbPlotParams->m_HPGLPenNum = ParseInt( HPGL_PEN_NUMBER_MIN,
            aPcbPlotParams->m_HPGLPenNum = ParseInt( HPGL_PEN_NUMBER_MIN,
@@ -349,44 +365,44 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_
                                                     HPGL_PEN_OVERLAP_MAX );
                                                     HPGL_PEN_OVERLAP_MAX );
            break;
            break;
        case T_pscolor:
        case T_pscolor:
            aPcbPlotParams->m_PlotPSColorOpt = ParseBool();
            NeedSYMBOL(); // This actually was never used...
            break;
            break;
        case T_psnegative:
        case T_psnegative:
            aPcbPlotParams->m_PlotPSNegative = ParseBool();
            aPcbPlotParams->m_negative = ParseBool();
            break;
            break;
        case T_plotreference:
        case T_plotreference:
            aPcbPlotParams->m_PlotReference = ParseBool();
            aPcbPlotParams->m_plotReference = ParseBool();
            break;
            break;
        case T_plotvalue:
        case T_plotvalue:
            aPcbPlotParams->m_PlotValue = ParseBool();
            aPcbPlotParams->m_plotValue = ParseBool();
            break;
            break;
        case T_plotothertext:
        case T_plotothertext:
            aPcbPlotParams->m_PlotTextOther = ParseBool();
            aPcbPlotParams->m_plotOtherText = ParseBool();
            break;
            break;
        case T_plotinvisibletext:
        case T_plotinvisibletext:
            aPcbPlotParams->m_PlotInvisibleTexts = ParseBool();
            aPcbPlotParams->m_plotInvisibleText = ParseBool();
            break;
            break;
        case T_padsonsilk:
        case T_padsonsilk:
            aPcbPlotParams->m_PlotPadsOnSilkLayer= ParseBool();
            aPcbPlotParams->m_plotPadsOnSilkLayer= ParseBool();
            break;
            break;
        case T_subtractmaskfromsilk:
        case T_subtractmaskfromsilk:
            aPcbPlotParams->subtractMaskFromSilk = ParseBool();
            aPcbPlotParams->m_subtractMaskFromSilk = ParseBool();
            break;
            break;
        case T_outputformat:
        case T_outputformat:
            aPcbPlotParams->m_PlotFormat = static_cast<PlotFormat>(ParseInt( 0, 3 ));
            aPcbPlotParams->m_format = static_cast<PlotFormat>( ParseInt( 0, 3 ) );
            break;
            break;
        case T_mirror:
        case T_mirror:
            aPcbPlotParams->m_PlotMirror = ParseBool();
            aPcbPlotParams->m_mirror = ParseBool();
            break;
            break;
        case T_drillshape:
        case T_drillshape:
            aPcbPlotParams->m_DrillShapeOpt = (PCB_PLOT_PARAMS::DrillShapeOptT) ParseInt( 0, 2 );
            aPcbPlotParams->m_drillMarks = static_cast<PCB_PLOT_PARAMS::DrillMarksType>( ParseInt( 0, 2 ) );
            break;
            break;
        case T_scaleselection:
        case T_scaleselection:
            aPcbPlotParams->scaleSelection = ParseInt( 0, 4 );
            aPcbPlotParams->m_scaleSelection = ParseInt( 0, 4 );
            break;
            break;
        case T_outputdirectory:
        case T_outputdirectory:
            NeedSYMBOL();
            NeedSYMBOL();
            aPcbPlotParams->outputDirectory = FROM_UTF8( CurText() );
            aPcbPlotParams->m_outputDirectory = FROM_UTF8( CurText() );
            break;
            break;
        default:
        default:
            Unexpected( CurText() );
            Unexpected( CurText() );
Loading