KiCad PCB EDA Suite
pcb_plot_params.cpp File Reference
#include <board_design_settings.h>
#include <convert_to_biu.h>
#include <layer_ids.h>
#include <macros.h>
#include <math/util.h>
#include <pcb_plot_params.h>
#include <pcb_plot_params_parser.h>
#include <plotters/plotter.h>
#include <settings/color_settings.h>

Go to the source code of this file.

Macros

#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
 
#define SVG_PRECISION_MIN   3U
 
#define SVG_PRECISION_MAX   6U
 
#define SVG_PRECISION_DEFAULT   6
 

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

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

◆ SVG_PRECISION_DEFAULT

#define SVG_PRECISION_DEFAULT   6

Definition at line 46 of file pcb_plot_params.cpp.

◆ SVG_PRECISION_MAX

#define SVG_PRECISION_MAX   6U

Definition at line 45 of file pcb_plot_params.cpp.

◆ SVG_PRECISION_MIN

#define SVG_PRECISION_MIN   3U

Definition at line 44 of file pcb_plot_params.cpp.

Function Documentation

◆ getTokenName()

static const char* getTokenName ( aTok)
static

Definition at line 57 of file pcb_plot_params.cpp.

58 {
59  return PCB_PLOT_PARAMS_LEXER::TokenName( aTok );
60 }

Referenced by PCB_PLOT_PARAMS::Format().

◆ setDouble()

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

Definition at line 77 of file pcb_plot_params.cpp.

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

Referenced by PCB_PLOT_PARAMS::SetHPGLPenDiameter().

◆ setInt()

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

Definition at line 63 of file pcb_plot_params.cpp.

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

Referenced by PCB_PLOT_PARAMS::SetHPGLPenSpeed().

Variable Documentation

◆ gbrDefaultPrecision