KiCad PCB EDA Suite
dialog_plot.cpp File Reference
#include <kiface_i.h>
#include <class_plotter.h>
#include <confirm.h>
#include <wxPcbStruct.h>
#include <pcbplot.h>
#include <gerber_jobfile_writer.h>
#include <base_units.h>
#include <macros.h>
#include <reporter.h>
#include <wildcards_and_files_ext.h>
#include <class_board.h>
#include <wx/ffile.h>
#include <dialog_plot.h>
#include <wx_html_report_panel.h>
#include <layers_id_colors_and_visibility.h>
#include <drc_stuff.h>

Go to the source code of this file.

Functions

static bool setDouble (double *aResult, double aValue, double aMin, double aMax)
 
static bool setInt (int *aResult, int aValue, int aMin, int aMax)
 

Function Documentation

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

Definition at line 544 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

545 {
546  if( aValue < aMin )
547  {
548  *aResult = aMin;
549  return false;
550  }
551  else if( aValue > aMax )
552  {
553  *aResult = aMax;
554  return false;
555  }
556 
557  *aResult = aValue;
558  return true;
559 }
static bool setInt ( int *  aResult,
int  aValue,
int  aMin,
int  aMax 
)
static

Definition at line 562 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

563 {
564  if( aValue < aMin )
565  {
566  *aResult = aMin;
567  return false;
568  }
569  else if( aValue > aMax )
570  {
571  *aResult = aMax;
572  return false;
573  }
574 
575  *aResult = aValue;
576  return true;
577 }