KiCad PCB EDA Suite
pcb_plot_params.cpp File Reference
#include <pcb_plot_params_parser.h>
#include <pcb_plot_params.h>
#include <layers_id_colors_and_visibility.h>
#include <plotter.h>
#include <macros.h>
#include <convert_to_biu.h>

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   (0.15*IU_PER_MM)
 
#define HPGL_PEN_DIAMETER_MIN   0
 
#define HPGL_PEN_DIAMETER_MAX   100
 
#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 *aInt, int aValue, int aMin, int 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
#define HPGL_PEN_DIAMETER_MIN   0
#define HPGL_PEN_NUMBER_MAX   16

Definition at line 40 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS_PARSER::Parse().

#define HPGL_PEN_NUMBER_MIN   1

Definition at line 39 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   (0.15*IU_PER_MM)

Definition at line 34 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS_PARSER::Parse().

#define PLOT_LINEWIDTH_MAX   (2*IU_PER_MM)

Definition at line 33 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetLineWidth().

#define PLOT_LINEWIDTH_MIN   (0.02*IU_PER_MM)

Definition at line 32 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::SetLineWidth().

Function Documentation

static const char* getTokenName ( aTok)
static

Definition at line 57 of file pcb_plot_params.cpp.

Referenced by PCB_PLOT_PARAMS::Format().

58 {
59  return PCB_PLOT_PARAMS_LEXER::TokenName( aTok );
60 }
static bool setInt ( int *  aInt,
int  aValue,
int  aMin,
int  aMax 
)
static

Definition at line 63 of file pcb_plot_params.cpp.

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

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

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 47 of file pcb_plot_params.cpp.

Referenced by CINFO3D_VISU::createLayers(), PCB_PLOT_PARAMS::GetLineWidth(), DIALOG_SVG_PRINT::initDialog(), DIALOG_GRAPHIC_ITEMS_OPTIONS::initValues(), DIALOG_PRINT_FOR_MODEDIT::InitValues(), DIALOG_PRINT_USING_PRINTER::initValues(), PCB_EDIT_FRAME::LoadSettings(), DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick(), PCB_PLOT_PARAMS::PCB_PLOT_PARAMS(), PCB_EDIT_FRAME::RedrawActiveWindow(), PCB_EDIT_FRAME::SaveSettings(), DIALOG_SVG_PRINT::SetPenWidth(), and DIALOG_PRINT_USING_PRINTER::SetPenWidth().