KiCad PCB EDA Suite
dialog_plot.cpp File Reference
#include <kiface_base.h>
#include <plotters/plotter.h>
#include <confirm.h>
#include <pcb_edit_frame.h>
#include <pcbnew_settings.h>
#include <pcbplot.h>
#include <pgm_base.h>
#include <gerber_jobfile_writer.h>
#include <reporter.h>
#include <wildcards_and_files_ext.h>
#include <layer_ids.h>
#include <locale_io.h>
#include <bitmaps.h>
#include <board.h>
#include <board_design_settings.h>
#include <dialog_plot.h>
#include <dialog_gendrill.h>
#include <wx_html_report_panel.h>
#include <tool/tool_manager.h>
#include <tools/zone_filler_tool.h>
#include <tools/drc_tool.h>
#include <math/util.h>
#include <macros.h>
#include <wx/dirdlg.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

◆ setDouble()

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

Definition at line 594 of file dialog_plot.cpp.

595 {
596  if( aValue < aMin )
597  {
598  *aResult = aMin;
599  return false;
600  }
601  else if( aValue > aMax )
602  {
603  *aResult = aMax;
604  return false;
605  }
606 
607  *aResult = aValue;
608  return true;
609 }

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ setInt()

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

Definition at line 612 of file dialog_plot.cpp.

613 {
614  if( aValue < aMin )
615  {
616  *aResult = aMin;
617  return false;
618  }
619  else if( aValue > aMax )
620  {
621  *aResult = aMax;
622  return false;
623  }
624 
625  *aResult = aValue;
626  return true;
627 }

Referenced by DIALOG_PLOT::applyPlotSettings().