Loading gerbview/dialogs/dialog_print_using_printer.cpp +12 −12 Original line number Original line Diff line number Diff line Loading @@ -175,7 +175,6 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) wxGROW | wxLEFT | wxRIGHT | wxTOP ); wxGROW | wxLEFT | wxRIGHT | wxTOP ); } } // Read the scale adjust option // Read the scale adjust option int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000 int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000 Loading Loading @@ -230,6 +229,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) m_FineAdjustYscaleOpt->Enable(enable); m_FineAdjustYscaleOpt->Enable(enable); } } int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() { { int page_count = 0; int page_count = 0; Loading gerbview/draw_gerber_screen.cpp +17 −4 Original line number Original line Diff line number Diff line Loading @@ -46,7 +46,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData ) bool aPrintMirrorMode, void* aData ) { { wxCHECK_RET( aData != NULL, wxT( "aDate cannot be NULL." ) ); wxCHECK_RET( aData != NULL, wxT( "aData cannot be NULL." ) ); // Save current draw options, because print mode has specific options: // Save current draw options, because print mode has specific options: GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; Loading @@ -60,14 +60,27 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, m_DisplayOptions.m_IsPrinting = true; m_DisplayOptions.m_IsPrinting = true; PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; // Find the layer to be printed int page = printParameters->m_Flags; // contains the page number (not necessarily layer number) int layer = 0; // Find the layer number for the printed page (search through the mask and count bits) while( page > 0 ) { if( printLayersMask[layer++] ) --page; } --layer; std::bitset <GERBER_DRAWLAYERS_COUNT> printCurrLayerMask; std::bitset <GERBER_DRAWLAYERS_COUNT> printCurrLayerMask; printCurrLayerMask.reset(); printCurrLayerMask.reset(); printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number printCurrLayerMask.set( layer ); GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); bool printBlackAndWhite = printParameters->m_Print_Black_and_White; bool printBlackAndWhite = printParameters->m_Print_Black_and_White; GetGerberLayout()->Draw( m_canvas, aDC, UNSPECIFIED_DRAWMODE, GetGerberLayout()->Draw( m_canvas, aDC, (GR_DRAWMODE) 0, wxPoint( 0, 0 ), printBlackAndWhite ); wxPoint( 0, 0 ), printBlackAndWhite ); m_canvas->SetPrintMirrored( false ); m_canvas->SetPrintMirrored( false ); Loading gerbview/printout_control.cpp +5 −6 Original line number Original line Diff line number Diff line Loading @@ -81,7 +81,7 @@ bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) { { // in gerbview, draw layers are always printed on separate pages // in gerbview, draw layers are always printed on separate pages // because handling negative objects when using only one page is tricky // because handling negative objects when using only one page is tricky m_PrintParams.m_Flags = aPage-1; // = gerber draw layer id m_PrintParams.m_Flags = aPage; DrawPage(); DrawPage(); return true; return true; Loading Loading @@ -261,8 +261,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() // B&W mode is handled in print page function // B&W mode is handled in print page function GRForceBlackPen( false ); GRForceBlackPen( false ); m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, &m_PrintParams ); &m_PrintParams ); m_Parent->SetDrawBgColor( bg_color ); m_Parent->SetDrawBgColor( bg_color ); screen->m_IsPrinting = false; screen->m_IsPrinting = false; Loading gerbview/class_gbr_layout.h +4 −4 File changed.Contains only whitespace changes. Show changes Loading
gerbview/dialogs/dialog_print_using_printer.cpp +12 −12 Original line number Original line Diff line number Diff line Loading @@ -175,7 +175,6 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) wxGROW | wxLEFT | wxRIGHT | wxTOP ); wxGROW | wxLEFT | wxRIGHT | wxTOP ); } } // Read the scale adjust option // Read the scale adjust option int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000 int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000 Loading Loading @@ -230,6 +229,7 @@ void DIALOG_PRINT_USING_PRINTER::InitValues( ) m_FineAdjustYscaleOpt->Enable(enable); m_FineAdjustYscaleOpt->Enable(enable); } } int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() int DIALOG_PRINT_USING_PRINTER::SetLayerSetFromListSelection() { { int page_count = 0; int page_count = 0; Loading
gerbview/draw_gerber_screen.cpp +17 −4 Original line number Original line Diff line number Diff line Loading @@ -46,7 +46,7 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, bool aPrintMirrorMode, void* aData ) bool aPrintMirrorMode, void* aData ) { { wxCHECK_RET( aData != NULL, wxT( "aDate cannot be NULL." ) ); wxCHECK_RET( aData != NULL, wxT( "aData cannot be NULL." ) ); // Save current draw options, because print mode has specific options: // Save current draw options, because print mode has specific options: GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; GBR_DISPLAY_OPTIONS imgDisplayOptions = m_DisplayOptions; Loading @@ -60,14 +60,27 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, LSET aPrintMasklayer, m_DisplayOptions.m_IsPrinting = true; m_DisplayOptions.m_IsPrinting = true; PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; PRINT_PARAMETERS* printParameters = (PRINT_PARAMETERS*) aData; // Find the layer to be printed int page = printParameters->m_Flags; // contains the page number (not necessarily layer number) int layer = 0; // Find the layer number for the printed page (search through the mask and count bits) while( page > 0 ) { if( printLayersMask[layer++] ) --page; } --layer; std::bitset <GERBER_DRAWLAYERS_COUNT> printCurrLayerMask; std::bitset <GERBER_DRAWLAYERS_COUNT> printCurrLayerMask; printCurrLayerMask.reset(); printCurrLayerMask.reset(); printCurrLayerMask.set(printParameters->m_Flags); // m_Flags contains the draw layer number printCurrLayerMask.set( layer ); GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); GetGerberLayout()->SetPrintableLayers( printCurrLayerMask ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); m_canvas->SetPrintMirrored( aPrintMirrorMode ); bool printBlackAndWhite = printParameters->m_Print_Black_and_White; bool printBlackAndWhite = printParameters->m_Print_Black_and_White; GetGerberLayout()->Draw( m_canvas, aDC, UNSPECIFIED_DRAWMODE, GetGerberLayout()->Draw( m_canvas, aDC, (GR_DRAWMODE) 0, wxPoint( 0, 0 ), printBlackAndWhite ); wxPoint( 0, 0 ), printBlackAndWhite ); m_canvas->SetPrintMirrored( false ); m_canvas->SetPrintMirrored( false ); Loading
gerbview/printout_control.cpp +5 −6 Original line number Original line Diff line number Diff line Loading @@ -81,7 +81,7 @@ bool BOARD_PRINTOUT_CONTROLLER::OnPrintPage( int aPage ) { { // in gerbview, draw layers are always printed on separate pages // in gerbview, draw layers are always printed on separate pages // because handling negative objects when using only one page is tricky // because handling negative objects when using only one page is tricky m_PrintParams.m_Flags = aPage-1; // = gerber draw layer id m_PrintParams.m_Flags = aPage; DrawPage(); DrawPage(); return true; return true; Loading Loading @@ -261,8 +261,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() // B&W mode is handled in print page function // B&W mode is handled in print page function GRForceBlackPen( false ); GRForceBlackPen( false ); m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, &m_PrintParams ); &m_PrintParams ); m_Parent->SetDrawBgColor( bg_color ); m_Parent->SetDrawBgColor( bg_color ); screen->m_IsPrinting = false; screen->m_IsPrinting = false; Loading