KiCad PCB EDA Suite
page_info.cpp File Reference
#include <common.h>
#include <page_info.h>
#include <macros.h>

Go to the source code of this file.

Macros

#define PAPER_A0   wxPAPER_A2
 
#define PAPER_A1   wxPAPER_A2
 
#define MMsize(x, y)   wxSize( Mm2mils( x ), Mm2mils( y ) )
 

Functions

static int clampWidth (int aWidthInMils)
 
static int clampHeight (int aHeightInMils)
 

Macro Definition Documentation

◆ MMsize

#define MMsize (   x,
 
)    wxSize( Mm2mils( x ), Mm2mils( y ) )

Definition at line 66 of file page_info.cpp.

◆ PAPER_A0

#define PAPER_A0   wxPAPER_A2

Definition at line 36 of file page_info.cpp.

◆ PAPER_A1

#define PAPER_A1   wxPAPER_A2

Definition at line 37 of file page_info.cpp.

Function Documentation

◆ clampHeight()

static int clampHeight ( int  aHeightInMils)
static

Definition at line 215 of file page_info.cpp.

216 {
217 /* was giving EESCHEMA single component SVG plotter grief
218  clamping is best done at the UI, i.e. dialog, levels
219  However a minimal test is made to avoid values that crashes Kicad
220  if( aHeightInMils < 4000 )
221  aHeightInMils = 4000;
222  else if( aHeightInMils > 44000 )
223  aHeightInMils = 44000;
224 */
225  if( aHeightInMils < 10 )
226  aHeightInMils = 10;
227  return aHeightInMils;
228 }

Referenced by PAGE_INFO::SetCustomHeightMils(), and PAGE_INFO::SetHeightMils().

◆ clampWidth()

static int clampWidth ( int  aWidthInMils)
static

Definition at line 200 of file page_info.cpp.

201 {
202 /* was giving EESCHEMA single component SVG plotter grief
203  However a minimal test is made to avoid values that crashes Kicad
204  if( aWidthInMils < 4000 ) // 4" is about a baseball card
205  aWidthInMils = 4000;
206  else if( aWidthInMils > 44000 ) //44" is plotter size
207  aWidthInMils = 44000;
208 */
209  if( aWidthInMils < 10 )
210  aWidthInMils = 10;
211  return aWidthInMils;
212 }

Referenced by PAGE_INFO::SetCustomWidthMils(), and PAGE_INFO::SetWidthMils().