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

Go to the source code of this file.

Classes

class  KIGFX::WS_RENDER_SETTINGS
 Class WS_RENDER_SETTINGS Stores page-layout-specific render settings. More...
 
class  KIGFX::WS_PAINTER
 Class 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 (wxDC *aDC, const PAGE_INFO &aPageInfo, const wxString &aFullSheetName, const wxString &aFileName, const TITLE_BLOCK &aTitleBlock, int aSheetCount, int aSheetNumber, int aPenWidth, double aScalar, COLOR4D aColor, 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 ( wxDC *  aDC,
const PAGE_INFO aPageInfo,
const wxString &  aFullSheetName,
const wxString &  aFileName,
const TITLE_BLOCK aTitleBlock,
int  aSheetCount,
int  aSheetNumber,
int  aPenWidth,
double  aScalar,
COLOR4D  aColor,
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).
aPenWidththe pen size The line width for drawing.
aScalarthe scale factor to convert from mils to internal units.
aColorThe color for drawing.
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 750 of file eda_draw_frame.cpp.

754 {
755  WS_DRAW_ITEM_LIST drawList;
756 
757  drawList.SetDefaultPenSize( aPenWidth );
758  drawList.SetMilsToIUfactor( aScalar );
759  drawList.SetSheetNumber( aSheetNumber );
760  drawList.SetSheetCount( aSheetCount );
761  drawList.SetFileName( aFileName );
762  drawList.SetSheetName( aFullSheetName );
763  drawList.SetSheetLayer( aSheetLayer );
764 
765  drawList.BuildWorkSheetGraphicList( aPageInfo, aTitleBlock );
766 
767  // Draw item list
768  drawList.Print( aDC, aColor );
769 }
void SetDefaultPenSize(int aPenSize)
Definition: ws_draw_item.h:425
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ws_draw_item.h:404
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ws_draw_item.h:420
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ws_draw_item.h:412
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:450
void SetMilsToIUfactor(double aScale)
Function SetMilsToIUfactor Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ws_draw_item.h:432
void SetSheetNumber(int aSheetNumber)
Function SetSheetNumber Set the value of the sheet number, for basic inscriptions.
Definition: ws_draw_item.h:441
void Print(wxDC *aDC, COLOR4D aColor)
Draws the item list created by BuildWorkSheetGraphicList.

References WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), WS_DRAW_ITEM_LIST::Print(), WS_DRAW_ITEM_LIST::SetDefaultPenSize(), WS_DRAW_ITEM_LIST::SetFileName(), WS_DRAW_ITEM_LIST::SetMilsToIUfactor(), 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().