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

Go to the source code of this file.

Classes

class  KIGFX::DS_RENDER_SETTINGS
 Store page-layout-specific render settings. More...
 
class  KIGFX::DS_PAINTER
 Methods for painting drawing sheet items. More...
 

Namespaces

 KIGFX
 The Cairo implementation of the graphics abstraction layer.
 

Functions

void PrintDrawingSheet (const 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

◆ PrintDrawingSheet()

void PrintDrawingSheet ( const 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.

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).
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 drawing sheet.
  • the LTmargin The left top margin of the drawing sheet.
  • the RBmargin The right bottom margin of the drawing sheet.

Definition at line 889 of file eda_draw_frame.cpp.

894 {
895  DS_DRAW_ITEM_LIST drawList;
896 
897  drawList.SetDefaultPenSize( aSettings->GetDefaultPenWidth() );
898  drawList.SetMilsToIUfactor( aMils2Iu );
899  drawList.SetPageNumber( aPageNumber );
900  drawList.SetSheetCount( aSheetCount );
901  drawList.SetFileName( aFileName );
902  drawList.SetSheetName( aFullSheetName );
903  drawList.SetSheetLayer( aSheetLayer );
904  drawList.SetProject( aProject );
905  drawList.SetIsFirstPage( aIsFirstPage );
906 
907  drawList.BuildDrawItemsList( aPageInfo, aTitleBlock );
908 
909  // Draw item list
910  drawList.Print( aSettings );
911 }
void SetIsFirstPage(bool aIsFirstPage)
Set if the page is the first page.
Definition: ds_draw_item.h:463
void SetMilsToIUfactor(double aMils2Iu)
Set the scalar to convert pages units (mils) to draw/plot units.
Definition: ds_draw_item.h:442
void SetDefaultPenSize(int aPenSize)
Definition: ds_draw_item.h:436
void SetFileName(const wxString &aFileName)
Set the filename to draw/plot.
Definition: ds_draw_item.h:415
void Print(const RENDER_SETTINGS *aSettings)
Draws the item list created by BuildDrawItemsList.
void SetPageNumber(const wxString &aPageNumber)
Set the value of the sheet number.
Definition: ds_draw_item.h:455
void SetSheetName(const wxString &aSheetName)
Set the sheet name to draw/plot.
Definition: ds_draw_item.h:423
void BuildDrawItemsList(const PAGE_INFO &aPageInfo, const TITLE_BLOCK &aTitleBlock)
Drawing or plot the drawing sheet.
void SetSheetLayer(const wxString &aSheetLayer)
Set the sheet layer to draw/plot.
Definition: ds_draw_item.h:431
void SetProject(const PROJECT *aProject)
Definition: ds_draw_item.h:400
void SetSheetCount(int aSheetCount)
Set the value of the count of sheets, for basic inscriptions.
Definition: ds_draw_item.h:468
int GetDefaultPenWidth() const
Store the list of graphic items: rect, lines, polygons and texts to draw/plot the title block and fra...
Definition: ds_draw_item.h:376

References DS_DRAW_ITEM_LIST::BuildDrawItemsList(), KIGFX::RENDER_SETTINGS::GetDefaultPenWidth(), DS_DRAW_ITEM_LIST::Print(), DS_DRAW_ITEM_LIST::SetDefaultPenSize(), DS_DRAW_ITEM_LIST::SetFileName(), DS_DRAW_ITEM_LIST::SetIsFirstPage(), DS_DRAW_ITEM_LIST::SetMilsToIUfactor(), DS_DRAW_ITEM_LIST::SetPageNumber(), DS_DRAW_ITEM_LIST::SetProject(), DS_DRAW_ITEM_LIST::SetSheetCount(), DS_DRAW_ITEM_LIST::SetSheetLayer(), and DS_DRAW_ITEM_LIST::SetSheetName().

Referenced by DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample().