Browse Source

PDF plotter: fix a rare pen width issue when plotting many pages in one file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20805

(cherry picked from commit a02f1f2411)
9.0
jean-pierre charras 7 months ago
parent
commit
c55d2c092e
  1. 4
      common/plotters/PDF_plotter.cpp
  2. 1
      pcbnew/plot_board_layers.cpp

4
common/plotters/PDF_plotter.cpp

@ -678,6 +678,10 @@ void PDF_PLOTTER::StartPage( const wxString& aPageNumber, const wxString& aPageN
m_paperSize.x *= 10.0 / m_iuPerDeviceUnit;
m_paperSize.y *= 10.0 / m_iuPerDeviceUnit;
// Set m_currentPenWidth to a unused value to ensure the pen width
// will be initialized to a the right value in pdf file by the first item to plot
m_currentPenWidth = 0;
// Open the content stream; the page object will go later
m_pageStreamHandle = startPdfStream();

1
pcbnew/plot_board_layers.cpp

@ -1364,6 +1364,7 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aL
return nullptr;
}
void setupPlotterNewPDFPage( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS* aPlotOpts,
const wxString& aLayerName, const wxString& aSheetName,
const wxString& aSheetPath, const wxString& aPageNumber,

Loading…
Cancel
Save