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 <drc/drc.h>
#include <tool/tool_manager.h>
#include <tools/zone_filler_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 559 of file dialog_plot.cpp.

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

Referenced by DIALOG_PLOT::applyPlotSettings().

◆ setInt()

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

Definition at line 577 of file dialog_plot.cpp.

578 {
579  if( aValue < aMin )
580  {
581  *aResult = aMin;
582  return false;
583  }
584  else if( aValue > aMax )
585  {
586  *aResult = aMax;
587  return false;
588  }
589 
590  *aResult = aValue;
591  return true;
592 }

Referenced by DIALOG_PLOT::applyPlotSettings().