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

Go to the source code of this file.


 Store page-layout-specific render settings. More...
 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, const wxString &aPageNumber, double aScalar, const PROJECT *aProject, const wxString &aSheetLayer=wxEmptyString, bool aIsFirstPage=true)
 Print the border and title block. 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,
const wxString &  aPageNumber,
double  aScalar,
const PROJECT aProject,
const wxString &  aSheetLayer = wxEmptyString,
bool  aIsFirstPage = true 

Print the border and title block.

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).
aPageNumberThe page number.
aScalarthe scale factor to convert from mils to internal units.
aSheetLayerThe layer from Pcbnew.
aIsFirstPageTrue when this is the first page. This only has meaning for schematics.

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 821 of file eda_draw_frame.cpp.

826 {
827  WS_DRAW_ITEM_LIST drawList;
829  drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
830  drawList.SetMilsToIUfactor( aScalar );
831  drawList.SetPageNumber( aPageNumber );
832  drawList.SetSheetCount( aSheetCount );
833  drawList.SetFileName( aFileName );
834  drawList.SetSheetName( aFullSheetName );
835  drawList.SetSheetLayer( aSheetLayer );
836  drawList.SetProject( aProject );
837  drawList.SetIsFirstPage( aIsFirstPage );
839  drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
841  // Draw item list
842  drawList.Print( aSettings );
843 }
void SetDefaultPenSize(int aPenSize)
Definition: ws_draw_item.h:437
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ws_draw_item.h:416
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ws_draw_item.h:432
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ws_draw_item.h:424
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Definition: ws_draw_item.h:451
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
Definition: ws_draw_item.h:359
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
Definition: ws_draw_item.h:459
void BuildWorkSheetGraphicList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the page layout.
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
Definition: ws_draw_item.h:464
void SetMilsToIUfactor(double aScale)
Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ws_draw_item.h:443
void Print(RENDER_SETTINGS *aSettings)
Draws the item list created by BuildWorkSheetGraphicList.
int GetDefaultPenWidth() const
void SetProject(const PROJECT *aProject)
Definition: ws_draw_item.h:401

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::SetIsFirstPage(), WS_DRAW_ITEM_LIST::SetMilsToIUfactor(), WS_DRAW_ITEM_LIST::SetPageNumber(), WS_DRAW_ITEM_LIST::SetProject(), WS_DRAW_ITEM_LIST::SetSheetCount(), WS_DRAW_ITEM_LIST::SetSheetLayer(), and WS_DRAW_ITEM_LIST::SetSheetName().

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