KiCad PCB EDA Suite
pcb_plot_params.cpp File Reference

Go to the source code of this file.

Macros

#define PLOT_LINEWIDTH_MIN   ( 0.02 * IU_PER_MM )
 
#define PLOT_LINEWIDTH_MAX   ( 2 * IU_PER_MM )
 
#define PLOT_LINEWIDTH_DEFAULT   ( DEFAULT_TEXT_WIDTH * IU_PER_MM )
 
#define HPGL_PEN_DIAMETER_MIN   0
 
#define HPGL_PEN_DIAMETER_MAX   100.0
 
#define HPGL_PEN_SPEED_MIN   1
 
#define HPGL_PEN_SPEED_MAX   99
 
#define HPGL_PEN_NUMBER_MIN   1
 
#define HPGL_PEN_NUMBER_MAX   16
 

Functions

static const char * getTokenName (T aTok)
 
static bool setInt (int *aTarget, int aValue, int aMin, int aMax)
 
static bool setDouble (double *aTarget, double aValue, double aMin, double aMax)
 

Variables

int g_DrawDefaultLineThickness = PLOT_LINEWIDTH_DEFAULT
 Default line thickness in internal units used to draw or plot items using a default thickness line value (Frame references) More...
 
static const int gbrDefaultPrecision = 6
 

Macro Definition Documentation

#define HPGL_PEN_DIAMETER_MAX   100.0
#define HPGL_PEN_DIAMETER_MIN   0

Definition at line 36 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetHPGLPenDiameter().

#define HPGL_PEN_NUMBER_MAX   16

Definition at line 41 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS_PARSER::Parse().

#define HPGL_PEN_NUMBER_MIN   1

Definition at line 40 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS_PARSER::Parse().

#define HPGL_PEN_SPEED_MAX   99
#define HPGL_PEN_SPEED_MIN   1
#define PLOT_LINEWIDTH_DEFAULT   ( DEFAULT_TEXT_WIDTH * IU_PER_MM )

Definition at line 35 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS_PARSER::Parse().

#define PLOT_LINEWIDTH_MAX   ( 2 * IU_PER_MM )

Definition at line 34 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetLineWidth().

#define PLOT_LINEWIDTH_MIN   ( 0.02 * IU_PER_MM )

Definition at line 33 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetLineWidth().

Function Documentation

static const char* getTokenName ( aTok)
static

Definition at line 58 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::Format().

59 {
60  return PCB_PLOT_PARAMS_LEXER::TokenName( aTok );
61 }
static bool setDouble ( double *  aTarget,
double  aValue,
double  aMin,
double  aMax 
)
static

Definition at line 78 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetHPGLPenDiameter().

79 {
80  double temp = aValue;
81 
82  if( aValue < aMin )
83  temp = aMin;
84  else if( aValue > aMax )
85  temp = aMax;
86 
87  *aTarget = temp;
88  return (temp == aValue);
89 }
static bool setInt ( int *  aTarget,
int  aValue,
int  aMin,
int  aMax 
)
static

Definition at line 64 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetHPGLPenSpeed(), and PCB_PLOT_PARAMS::SetLineWidth().

65 {
66  int temp = aValue;
67 
68  if( aValue < aMin )
69  temp = aMin;
70  else if( aValue > aMax )
71  temp = aMax;
72 
73  *aTarget = temp;
74  return (temp == aValue);
75 }

Variable Documentation

int g_DrawDefaultLineThickness = PLOT_LINEWIDTH_DEFAULT

Default line thickness in internal units used to draw or plot items using a default thickness line value (Frame references)

Default line thickness in PCnew units used to draw or plot items having a default thickness line value (Frame references) (i.e.

Definition at line 48 of file pcb_plot_params.cpp.

Referenced by CINFO3D_VISU::createLayers(), DIALOG_EXPORT_SVG::ExportSVGFile(), PCB_PLOT_PARAMS::GetLineWidth(), DIALOG_EXPORT_SVG::initDialog(), PCB_EDIT_FRAME::LoadSettings(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), PCB_EDIT_FRAME::RedrawActiveWindow(), PCB_EDIT_FRAME::SaveSettings(), and DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG().