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

Go to the source code of this file.

Functions

void DrawPageLayout (wxDC *aDC, EDA_RECT *aClipBox, const PAGE_INFO &aPageInfo, const wxString &aFullSheetName, const wxString &aFileName, TITLE_BLOCK &aTitleBlock, int aSheetCount, int aSheetNumber, int aPenWidth, double aScalar, COLOR4D aColor, COLOR4D aAltColor, const wxString &aSheetLayer=wxEmptyString)
 Function DrawPageLayout is a core function to draw the page layout with the frame and the basic inscriptions. More...
 

Function Documentation

◆ DrawPageLayout()

void DrawPageLayout ( wxDC *  aDC,
EDA_RECT aClipBox,
const PAGE_INFO aPageInfo,
const wxString &  aFullSheetName,
const wxString &  aFileName,
TITLE_BLOCK aTitleBlock,
int  aSheetCount,
int  aSheetNumber,
int  aPenWidth,
double  aScalar,
COLOR4D  aColor,
COLOR4D  aAltColor,
const wxString &  aSheetLayer = wxEmptyString 
)

Function DrawPageLayout is a core function to draw the page layout with the frame and the basic inscriptions.

Parameters
aDCThe device context.
aClipBox= the clipping rect, or NULL if no clipping.
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.
aAltColorThe color for items which need to be "hightlighted".
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 1791 of file legacy_gal/eda_draw_frame.cpp.

1800 {
1801  WS_DRAW_ITEM_LIST drawList;
1802 
1803  drawList.SetPenSize( aPenWidth );
1804  drawList.SetMilsToIUfactor( aScalar );
1805  drawList.SetSheetNumber( aSheetNumber );
1806  drawList.SetSheetCount( aSheetCount );
1807  drawList.SetFileName( aFileName );
1808  drawList.SetSheetName( aFullSheetName );
1809  drawList.SetSheetLayer( aSheetLayer );
1810 
1811  drawList.BuildWorkSheetGraphicList( aPageInfo,
1812  aTitleBlock, aColor, aAltColor );
1813 
1814  // Draw item list
1815  drawList.Draw( aClipBox, aDC );
1816 }
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
void SetPenSize(int aPenSize)
Function SetPenSize Set the default pen size to draw/plot lines and texts.
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
void BuildWorkSheetGraphicList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock, COLOR4D aColor, COLOR4D aAltColor)
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.
void SetMilsToIUfactor(double aScale)
Function SetMilsToIUfactor Set the scalar to convert pages units ( mils) to draw/plot units.
void SetSheetNumber(int aSheetNumber)
Function SetSheetNumber Set the value of the sheet number, for basic inscriptions.
void Draw(EDA_RECT *aClipBox, wxDC *aDC)
Draws the item list created by BuildWorkSheetGraphicList.

References WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList(), WS_DRAW_ITEM_LIST::Draw(), WS_DRAW_ITEM_LIST::SetFileName(), WS_DRAW_ITEM_LIST::SetMilsToIUfactor(), WS_DRAW_ITEM_LIST::SetPenSize(), 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::DrawWorkSheet(), and DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample().