KiCad PCB EDA Suite
dialog_plot.cpp File Reference
#include <kiface_i.h>
#include <plot_common.h>
#include <confirm.h>
#include <wxPcbStruct.h>
#include <pcbplot.h>
#include <base_units.h>
#include <macros.h>
#include <reporter.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 535 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

536 {
537  if( aValue < aMin )
538  {
539  *aResult = aMin;
540  return false;
541  }
542  else if( aValue > aMax )
543  {
544  *aResult = aMax;
545  return false;
546  }
547 
548  *aResult = aValue;
549  return true;
550 }
static bool setInt ( int *  aResult,
int  aValue,
int  aMin,
int  aMax 
)
static

Definition at line 553 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

554 {
555  if( aValue < aMin )
556  {
557  *aResult = aMin;
558  return false;
559  }
560  else if( aValue > aMax )
561  {
562  *aResult = aMax;
563  return false;
564  }
565 
566  *aResult = aValue;
567  return true;
568 }