KiCad PCB EDA Suite
sch_sheet.cpp File Reference
#include <bitmaps.h>
#include <core/mirror.h>
#include <sch_draw_panel.h>
#include <trigo.h>
#include <sch_edit_frame.h>
#include <plotters/plotter.h>
#include <string_utils.h>
#include <widgets/msgpanel.h>
#include <math/util.h>
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include <sch_sheet_pin.h>
#include <sch_symbol.h>
#include <sch_painter.h>
#include <schematic.h>
#include <settings/color_settings.h>
#include <trace_helpers.h>
#include <pgm_base.h>
#include <wx/log.h>

Go to the source code of this file.

Macros

#define SHEET_NAME_CANONICAL   "Sheet name"
 
#define SHEET_FILE_CANONICAL   "Sheet file"
 
#define USER_FIELD_CANONICAL   "Field%d"
 

Functions

int bumpToNextGrid (const int aVal, const int aDirection)
 

Macro Definition Documentation

◆ SHEET_FILE_CANONICAL

#define SHEET_FILE_CANONICAL   "Sheet file"

Definition at line 46 of file sch_sheet.cpp.

◆ SHEET_NAME_CANONICAL

#define SHEET_NAME_CANONICAL   "Sheet name"

Definition at line 45 of file sch_sheet.cpp.

◆ USER_FIELD_CANONICAL

#define USER_FIELD_CANONICAL   "Field%d"

Definition at line 47 of file sch_sheet.cpp.

Function Documentation

◆ bumpToNextGrid()

int bumpToNextGrid ( const int  aVal,
const int  aDirection 
)

Definition at line 410 of file sch_sheet.cpp.

411 {
412  constexpr int gridSize = Mils2iu( 50 );
413 
414  return ( KiROUND( aVal / gridSize ) * gridSize ) + ( aDirection * gridSize );
415 }
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:73

References KiROUND().

Referenced by SCH_SHEET::GetMinHeight(), and SCH_SHEET::GetMinWidth().