KiCad PCB EDA Suite
ws_painter.h File Reference
#include <gal/color4d.h>
#include <painter.h>
#include <page_info.h>
#include <ws_draw_item.h>

Go to the source code of this file.


 WS_RENDER_SETTINGS Stores page-layout-specific render settings. More...
 WS_PAINTER Contains methods for drawing worksheet items. More...


 Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.


void PrintPageLayout (RENDER_SETTINGS *aSettings, const PAGE_INFO &aPageInfo, const wxString &aFullSheetName, const wxString &aFileName, const TITLE_BLOCK &aTitleBlock, int aSheetCount, int aSheetNumber, double aScalar, const PROJECT *aProject, const wxString &aSheetLayer=wxEmptyString)
 Function PrintPageLayout is a core function to print the page layout with the frame and the basic inscriptions. More...

Function Documentation

◆ PrintPageLayout()

void PrintPageLayout ( RENDER_SETTINGS aSettings,
const PAGE_INFO aPageInfo,
const wxString &  aFullSheetName,
const wxString &  aFileName,
const TITLE_BLOCK aTitleBlock,
int  aSheetCount,
int  aSheetNumber,
double  aScalar,
const PROJECT aProject,
const wxString &  aSheetLayer = wxEmptyString 

Function PrintPageLayout is a core function to print the page layout with the frame and the basic inscriptions.

aDCThe device context.
aPageInfofor margins and page size (in mils).
aFullSheetNameThe sheetpath (full sheet name), for basic inscriptions.
aFileNameThe file name, for basic inscriptions.
aTitleBlockThe sheet title block, for basic inscriptions.
aSheetCountThe number of sheets (for basic inscriptions).
aSheetNumberThe sheet number (for basic inscriptions).
aScalarthe scale factor to convert from mils to internal units.
aSheetLayerThe layer from pcbnew.

Parameters used in aPageInfo

  • the size of the page layout.
  • the LTmargin The left top margin of the page layout.
  • the RBmargin The right bottom margin of the page layout.

Definition at line 814 of file eda_draw_frame.cpp.

818 {
819  WS_DRAW_ITEM_LIST drawList;
821  drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
822  drawList.SetMilsToIUfactor( aScalar );
823  drawList.SetSheetNumber( aSheetNumber );
824  drawList.SetSheetCount( aSheetCount );
825  drawList.SetFileName( aFileName );
826  drawList.SetSheetName( aFullSheetName );
827  drawList.SetSheetLayer( aSheetLayer );
828  drawList.SetProject( aProject );
830  drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
832  // Draw item list
833  drawList.Print( aSettings );
834 }
void SetDefaultPenSize(int aPenSize)
Definition: ws_draw_item.h:429
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ws_draw_item.h:408
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ws_draw_item.h:424
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ws_draw_item.h:416
void BuildWorkSheetGraphicList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Function BuildWorkSheetGraphicList is a core function for drawing or plotting the page layout with th...
void SetSheetCount(int aSheetCount)
Function SetSheetCount Set the value of the count of sheets, for basic inscriptions.
Definition: ws_draw_item.h:454
void SetMilsToIUfactor(double aScale)
Function SetMilsToIUfactor Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ws_draw_item.h:436
void Print(RENDER_SETTINGS *aSettings)
Draws the item list created by BuildWorkSheetGraphicList.
void SetSheetNumber(int aSheetNumber)
Function SetSheetNumber Set the value of the sheet number, for basic inscriptions.
Definition: ws_draw_item.h:445
int GetDefaultPenWidth() const
void SetProject(const PROJECT *aProject)
Definition: ws_draw_item.h:393

References WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), WS_DRAW_ITEM_LIST::Print(), WS_DRAW_ITEM_LIST::SetDefaultPenSize(), WS_DRAW_ITEM_LIST::SetFileName(), WS_DRAW_ITEM_LIST::SetMilsToIUfactor(), WS_DRAW_ITEM_LIST::SetProject(), WS_DRAW_ITEM_LIST::SetSheetCount(), WS_DRAW_ITEM_LIST::SetSheetLayer(), WS_DRAW_ITEM_LIST::SetSheetName(), and WS_DRAW_ITEM_LIST::SetSheetNumber().

Referenced by EDA_DRAW_FRAME::PrintWorkSheet(), and DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample().