KiCad PCB EDA Suite
dialog_plot.cpp File Reference
#include <kiface_i.h>
#include <plotter.h>
#include <confirm.h>
#include <pcb_edit_frame.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 <bitmaps.h>
#include <class_board.h>
#include <wx/ffile.h>
#include <dialog_plot.h>
#include <wx_html_report_panel.h>
#include <drc.h>
#include <layers_id_colors_and_visibility.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 554 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

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

Definition at line 572 of file dialog_plot.cpp.

Referenced by DIALOG_PLOT::applyPlotSettings().

573 {
574  if( aValue < aMin )
575  {
576  *aResult = aMin;
577  return false;
578  }
579  else if( aValue > aMax )
580  {
581  *aResult = aMax;
582  return false;
583  }
584 
585  *aResult = aValue;
586  return true;
587 }