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>
#include <board_design_settings.h>
#include <math/util.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   ( 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

◆ HPGL_PEN_DIAMETER_MAX

#define HPGL_PEN_DIAMETER_MAX   100.0

Definition at line 38 of file pcb_plot_params.cpp.

◆ HPGL_PEN_DIAMETER_MIN

#define HPGL_PEN_DIAMETER_MIN   0

Definition at line 37 of file pcb_plot_params.cpp.

◆ HPGL_PEN_NUMBER_MAX

#define HPGL_PEN_NUMBER_MAX   16

Definition at line 42 of file pcb_plot_params.cpp.

◆ HPGL_PEN_NUMBER_MIN

#define HPGL_PEN_NUMBER_MIN   1

Definition at line 41 of file pcb_plot_params.cpp.

◆ HPGL_PEN_SPEED_MAX

#define HPGL_PEN_SPEED_MAX   99

Definition at line 40 of file pcb_plot_params.cpp.

◆ HPGL_PEN_SPEED_MIN

#define HPGL_PEN_SPEED_MIN   1

Definition at line 39 of file pcb_plot_params.cpp.

◆ PLOT_LINEWIDTH_DEFAULT

#define PLOT_LINEWIDTH_DEFAULT   ( DEFAULT_TEXT_WIDTH * IU_PER_MM )

Definition at line 36 of file pcb_plot_params.cpp.

◆ PLOT_LINEWIDTH_MAX

#define PLOT_LINEWIDTH_MAX   ( 2 * IU_PER_MM )

Definition at line 35 of file pcb_plot_params.cpp.

◆ PLOT_LINEWIDTH_MIN

#define PLOT_LINEWIDTH_MIN   ( 0.02 * IU_PER_MM )

Definition at line 34 of file pcb_plot_params.cpp.

Function Documentation

◆ getTokenName()

static const char* getTokenName ( aTok)
static

Definition at line 59 of file pcb_plot_params.cpp.

60 {
61  return PCB_PLOT_PARAMS_LEXER::TokenName( aTok );
62 }

Referenced by PCB_PLOT_PARAMS::Format().

◆ setDouble()

static bool setDouble ( double *  aTarget,
double  aValue,
double  aMin,
double  aMax 
)
static

Definition at line 79 of file pcb_plot_params.cpp.

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

Referenced by PCB_PLOT_PARAMS::SetHPGLPenDiameter().

◆ setInt()

static bool setInt ( int *  aTarget,
int  aValue,
int  aMin,
int  aMax 
)
static

Definition at line 65 of file pcb_plot_params.cpp.

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

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

Variable Documentation

◆ g_DrawDefaultLineThickness

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

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

◆ gbrDefaultPrecision