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 <pcbnew_settings.h>
#include <pcbplot.h>
#include <gerber_jobfile_writer.h>
#include <reporter.h>
#include <wildcards_and_files_ext.h>
#include <layers_id_colors_and_visibility.h>
#include <bitmaps.h>
#include <class_board.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>

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 584 of file dialog_plot.cpp.

585 {
586  if( aValue < aMin )
587  {
588  *aResult = aMin;
589  return false;
590  }
591  else if( aValue > aMax )
592  {
593  *aResult = aMax;
594  return false;
595  }
596 
597  *aResult = aValue;
598  return true;
599 }

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ setInt()

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

Definition at line 602 of file dialog_plot.cpp.

603 {
604  if( aValue < aMin )
605  {
606  *aResult = aMin;
607  return false;
608  }
609  else if( aValue > aMax )
610  {
611  *aResult = aMax;
612  return false;
613  }
614 
615  *aResult = aValue;
616  return true;
617 }

Referenced by DIALOG_PLOT::applyPlotSettings().