KiCad PCB EDA Suite
class_page_info.cpp File Reference
#include <common.h>
#include <class_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

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

Definition at line 65 of file class_page_info.cpp.

#define PAPER_A0   wxPAPER_A2

Definition at line 36 of file class_page_info.cpp.

#define PAPER_A1   wxPAPER_A2

Definition at line 37 of file class_page_info.cpp.

Function Documentation

static int clampHeight ( int  aHeightInMils)
static

Definition at line 211 of file class_page_info.cpp.

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

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

Definition at line 196 of file class_page_info.cpp.

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

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