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.

Classes

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

Namespaces

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

Functions

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.

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

750 {
751  WS_DRAW_ITEM_LIST drawList;
752 
753  drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
754  drawList.SetMilsToIUfactor( aScalar );
755  drawList.SetSheetNumber( aSheetNumber );
756  drawList.SetSheetCount( aSheetCount );
757  drawList.SetFileName( aFileName );
758  drawList.SetSheetName( aFullSheetName );
759  drawList.SetSheetLayer( aSheetLayer );
760  drawList.SetProject( aProject );
761 
762  drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
763 
764  // Draw item list
765  drawList.Print( aSettings );
766 }
void SetDefaultPenSize(int aPenSize)
Definition: ws_draw_item.h:426
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ws_draw_item.h:405
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ws_draw_item.h:421
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ws_draw_item.h:413
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:451
void SetMilsToIUfactor(double aScale)
Function SetMilsToIUfactor Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ws_draw_item.h:433
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:442
int GetDefaultPenWidth() const
void SetProject(const PROJECT *aProject)
Definition: ws_draw_item.h:390

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().