KiCad PCB EDA Suite
gerbview_printout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
3  * Copyright (C) 2018 CERN
4  * Author: Maciej Suminski <maciej.suminski@cern.ch>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation, either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef GERBVIEW_PRINTOUT_H
21 #define GERBVIEW_PRINTOUT_H
22 
23 #include <board_printout.h>
24 
25 class GBR_LAYOUT;
26 
28 {
29 public:
30  GERBVIEW_PRINTOUT( GBR_LAYOUT* aLayout, const BOARD_PRINTOUT_SETTINGS& aParams,
31  const KIGFX::VIEW* aView, const wxString& aTitle );
32 
33  bool OnPrintPage( int aPage ) override;
34 
35 protected:
36  int milsToIU( double aMils ) const override;
37 
38  void setupViewLayers( const std::unique_ptr<KIGFX::VIEW>& aView, const LSET& aLayerSet ) override;
39 
40  void setupGal( KIGFX::GAL* aGal ) override;
41 
42  EDA_RECT getBoundingBox() override;
43 
44  std::unique_ptr<KIGFX::PAINTER> getPainter( KIGFX::GAL* aGal ) override;
45 
46 private:
48 };
49 
50 #endif /* GERBVIEW_PRINTOUT_H */
void setupGal(KIGFX::GAL *aGal) override
Configures GAL object for a printout
Class GBR_LAYOUT holds list of GERBER_DRAW_ITEM currently loaded.
Definition: gbr_layout.h:53
GBR_LAYOUT * m_layout
std::unique_ptr< KIGFX::PAINTER > getPainter(KIGFX::GAL *aGal) override
Returns a PAINTER instance used to draw the items.
Class LSET is a set of PCB_LAYER_IDs.
bool OnPrintPage(int aPage) override
void setupViewLayers(const std::unique_ptr< KIGFX::VIEW > &aView, const LSET &aLayerSet) override
Enables layers visibility for a printout
GERBVIEW_PRINTOUT(GBR_LAYOUT *aLayout, const BOARD_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)
Class BOARD_PRINTOUT is a class derived from wxPrintout to handle the necessary information to contro...
int milsToIU(double aMils) const override
Convert mils to internal units
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
EDA_RECT getBoundingBox() override
Returns bounding box of the printed objects (excluding worksheet frame)
Board print handler definition file.
Class VIEW.
Definition: view.h:61
Class GAL is the abstract interface for drawing on a 2D-surface.