KiCad PCB EDA Suite
PRINT_PARAMETERS Class Reference

Class PRINT_PARAMETERS handles the parameters used to print a board drawing. More...

#include <printout_controler.h>

Public Types

enum  DrillShapeOptT { NO_DRILL_SHAPE = 0, SMALL_DRILL_SHAPE = 1, FULL_DRILL_SHAPE = 2 }
 

Public Member Functions

 PRINT_PARAMETERS ()
 
bool PrintBorderAndTitleBlock () const
 Function PrintBorderAndTitleBlock returns true if the drawing border and title block should be printed. More...
 
bool CenterOnBoardOutline () const
 Function CenterOnBoardOutline returns true if the print should be centered by the board outline instead of the paper size. More...
 

Public Attributes

int m_PenDefaultSize
 
double m_PrintScale
 
double m_XScaleAdjust
 
double m_YScaleAdjust
 
bool m_Print_Sheet_Ref
 
LSET m_PrintMaskLayer
 
bool m_PrintMirror
 
bool m_Print_Black_and_White
 
int m_OptionPrintPage
 
int m_PageCount
 
bool m_ForceCentered
 
int m_Flags
 
wxPageSetupDialogData * m_PageSetupData
 
DrillShapeOptT m_DrillShapeOpt
 

Detailed Description

Class PRINT_PARAMETERS handles the parameters used to print a board drawing.

Definition at line 47 of file printout_controler.h.

Member Enumeration Documentation

Enumerator
NO_DRILL_SHAPE 
SMALL_DRILL_SHAPE 
FULL_DRILL_SHAPE 

Definition at line 65 of file printout_controler.h.

Constructor & Destructor Documentation

PRINT_PARAMETERS::PRINT_PARAMETERS ( )

Definition at line 55 of file printout_controler.cpp.

References m_DrillShapeOpt, m_Flags, m_ForceCentered, m_OptionPrintPage, m_PageCount, m_PageSetupData, m_PenDefaultSize, m_Print_Black_and_White, m_Print_Sheet_Ref, m_PrintMaskLayer, m_PrintMirror, m_PrintScale, m_XScaleAdjust, m_YScaleAdjust, and SMALL_DRILL_SHAPE.

56 {
57  m_PenDefaultSize = Millimeter2iu( 0.2 ); // A reasonable default value to draw items
58  // which do not have a specified line width
59  m_PrintScale = 1.0;
60  m_XScaleAdjust = 1.0;
61  m_YScaleAdjust = 1.0;
62  m_Print_Sheet_Ref = false;
63  m_PrintMaskLayer.set();
64  m_PrintMirror = false;
67  m_PageCount = 1;
68  m_ForceCentered = false;
69  m_Flags = 0;
71  m_PageSetupData = NULL;
72 }
DrillShapeOptT m_DrillShapeOpt
wxPageSetupDialogData * m_PageSetupData

Member Function Documentation

bool PRINT_PARAMETERS::CenterOnBoardOutline ( ) const
inline

Function CenterOnBoardOutline returns true if the print should be centered by the board outline instead of the paper size.

Definition at line 90 of file printout_controler.h.

References PrintBorderAndTitleBlock().

Referenced by BOARD_PRINTOUT_CONTROLLER::DrawPage().

91  {
92  return !PrintBorderAndTitleBlock() && ( m_ForceCentered || (m_PrintScale > 1.0) ||
93  (m_PrintScale == 0) );
94  }
bool PrintBorderAndTitleBlock() const
Function PrintBorderAndTitleBlock returns true if the drawing border and title block should be printe...
bool PRINT_PARAMETERS::PrintBorderAndTitleBlock ( ) const
inline

Function PrintBorderAndTitleBlock returns true if the drawing border and title block should be printed.

For scale factors greater than one, the border is not printed because it will end up scaling off of the page.

Definition at line 83 of file printout_controler.h.

References m_Print_Sheet_Ref.

Referenced by CenterOnBoardOutline(), and BOARD_PRINTOUT_CONTROLLER::DrawPage().

83 { return m_PrintScale <= 1.0 && m_Print_Sheet_Ref; }

Member Data Documentation

bool PRINT_PARAMETERS::m_ForceCentered

The documentation for this class was generated from the following files: