63    for( 
unsigned layer = 0; layer < 
m_LayerSet.size(); ++layer )
 
 
   70                                const KIGFX::VIEW* aView, 
const wxString& aTitle ) :
 
 
   96    std::unique_ptr<KIGFX::PAINTER> painter = 
getPainter( gal );
 
   97    std::unique_ptr<KIGFX::VIEW> view( 
m_view->DataReference() );
 
  100    wxRect         pageSizePx = GetLogicalPageRect();
 
  101    const VECTOR2D pageSizeIn( (
double) pageSizePx.width / dc->GetPPI().x,
 
  102                               (
double) pageSizePx.height / dc->GetPPI().y );
 
  105    galPrint->SetSheetSize( pageSizeIn );
 
  108    view->SetPainter( painter.get() );
 
  109    view->SetScaleLimits( 10e9, 0.0001 );
 
  110    view->SetScale( 1.0 );
 
  167            double scaleX = (double) pageSizeIU.
x / drawingAreaBBox.
GetWidth();
 
  168            double scaleY = (double) pageSizeIU.
y / drawingAreaBBox.
GetHeight();
 
  169            m_settings.m_scale = std::min( scaleX, scaleY );
 
  183    gal->
ResizeScreen( pageSizePx.GetWidth(),pageSizePx.GetHeight() );
 
  190        view->UseDrawPriority( 
true );
 
 
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
 
virtual void DrawPage(const wxString &aLayerName=wxEmptyString, int aPageNum=1, int aPageCount=1)
Print a page (or a set of pages).
 
bool m_gerbviewPrint
True if the caller is Gerbview, false for Pcbnew.
 
virtual void setupPainter(KIGFX::PAINTER &aPainter)
Configure #PAINTER object for a printout.
 
virtual int milsToIU(double aMils) const =0
Convert mils to internal units.
 
virtual std::unique_ptr< KIGFX::PAINTER > getPainter(KIGFX::GAL *aGal)=0
Return the #PAINTER instance used to draw the items.
 
const KIGFX::VIEW * m_view
Source VIEW object (note that actual printing only refers to this object).
 
virtual void setupViewLayers(KIGFX::VIEW &aView, const LSET &aLayerSet)
Enable layers visibility for a printout.
 
BOARD_PRINTOUT(const BOARD_PRINTOUT_SETTINGS &aParams, const KIGFX::VIEW *aView, const wxString &aTitle)
 
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) override
 
virtual void setupGal(KIGFX::GAL *aGal)
Configure GAL object for a printout.
 
BOARD_PRINTOUT_SETTINGS m_settings
Printout parameters.
 
virtual BOX2I getBoundingBox()=0
Return bounding box of the printed objects (excluding drawing-sheet frame).
 
constexpr size_type GetWidth() const
 
constexpr Vec Centre() const
 
constexpr size_type GetHeight() const
 
static const COLOR4D WHITE
 
static const COLOR4D BLACK
 
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
 
static std::unique_ptr< GAL_PRINT > Create(GAL_DISPLAY_OPTIONS &aOptions, wxDC *aDC)
 
Abstract interface for drawing on a 2D-surface.
 
virtual void ResizeScreen(int aWidth, int aHeight)
Resize the canvas.
 
void SetFlip(bool xAxis, bool yAxis)
Sets flipping of the screen.
 
void SetZoomFactor(double aZoomFactor)
 
void SetLookAtPoint(const VECTOR2D &aPoint)
Get/set the Point in world space to look at.
 
virtual void ClearScreen()
Clear the screen.
 
void SetClearColor(const COLOR4D &aColor)
 
const VECTOR2I & GetScreenPixelSize() const
Return GAL canvas size in pixels.
 
Contains all the knowledge about how to draw graphical object onto any particular output device.
 
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
 
virtual bool HasNativeLandscapeRotation() const =0
 
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
 
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
 
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
void SetPrintLayers(const LSET &aLayerSet)
 
virtual void SetBackgroundColor(const COLOR4D &aColor)=0
Set the background color.
 
void SetLayerName(const wxString &aLayerName)
 
virtual const COLOR4D & GetBackgroundColor() const =0
Return current background color settings.
 
void SetIsPrinting(bool isPrinting)
 
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
 
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
 
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
 
static constexpr int VIEW_MAX_LAYERS
Maximum number of layers that may be shown.
 
virtual void SetTopLayer(int aLayer, bool aEnabled=true)
Set given layer to be displayed on the top or sets back the default order of layers.
 
LSET is a set of PCB_LAYER_IDs.
 
Describe the page size and margins of a paper page on which to eventually print or plot.
 
#define LAYER_ID_COUNT
Must update this if you add any enums after Gerbview!
 
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
 
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
 
std::vector< int > layers
List of enabled layers for printing.
 
void Load(APP_SETTINGS_BASE *aConfig) override
 
BOARD_PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
 
LSET m_LayerSet
Layers to print.
 
void Save(APP_SETTINGS_BASE *aConfig) override
 
bool m_Mirror
Print mirrored.
 
virtual void Save(APP_SETTINGS_BASE *aConfig)
 
PRINTOUT_SETTINGS(const PAGE_INFO &aPageInfo)
 
virtual void Load(APP_SETTINGS_BASE *aConfig)
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D