38#define MIN_PAGE_SIZE_MILS 1000
39#define MAX_PAGE_SIZE_PCBNEW_MILS 48000
40#define MAX_PAGE_SIZE_EESCHEMA_MILS 120000
43#define MIN_PAGE_SIZE_MM 25.4
44#define MAX_PAGE_SIZE_PCBNEW_MM 48000*.0254
45#define MAX_PAGE_SIZE_EESCHEMA_MM 120000*.0254
67 static const wxChar A5[];
68 static const wxChar
A4[];
69 static const wxChar
A3[];
70 static const wxChar
A2[];
71 static const wxChar
A1[];
72 static const wxChar
A0[];
73 static const wxChar
A[];
74 static const wxChar
B[];
75 static const wxChar
C[];
76 static const wxChar
D[];
77 static const wxChar
E[];
79 static const wxChar USLetter[];
80 static const wxChar USLegal[];
81 static const wxChar USLedger[];
82 static const wxChar Custom[];
98 bool SetType(
const wxString& aStandardPageDescriptionName,
bool aIsPortrait =
false );
99 const wxString&
GetType()
const {
return m_type; }
109 bool IsCustom()
const;
121 void SetPortrait(
bool aIsPortrait );
127 wxPrintOrientation
GetWxOrientation()
const {
return IsPortrait() ? wxPORTRAIT : wxLANDSCAPE; }
134 void SetWidthMM(
double aWidthInMM ) { SetWidthMils( aWidthInMM * 1000 / 25.4 ); }
135 void SetWidthMils(
double aWidthInMils );
139 void SetHeightMM(
double aHeightInMM ) { SetHeightMils( aHeightInMM * 1000 / 25.4 ); }
140 void SetHeightMils(
double aHeightInMils );
153 int GetWidthIU(
double aIUScale )
const {
return aIUScale * GetWidthMils(); }
162 int GetHeightIU(
double aIUScale )
const {
return aIUScale * GetHeightMils(); }
173 return VECTOR2D( GetWidthIU( aIUScale ), GetHeightIU( aIUScale ) );
180 static void SetCustomWidthMils(
double aWidthInMils );
186 static void SetCustomHeightMils(
double aHeightInMils );
210 PAGE_INFO(
const VECTOR2D& aSizeMils,
const wxString& aName, wxPaperSize aPaperId );
245 void updatePortrait();
Describe the page size and margins of a paper page on which to eventually print or plot.
static const PAGE_INFO pageD
static const PAGE_INFO pageC
bool m_portrait
true if portrait, false if landscape
static const PAGE_INFO pageA5
int GetHeightIU(double aIUScale) const
Gets the page height in IU.
static const PAGE_INFO pageUSLedger
static const PAGE_INFO pageE
void SetWidthMM(double aWidthInMM)
static double s_user_width
static const PAGE_INFO pageA4
static const PAGE_INFO pageUser
static double s_user_height
static const PAGE_INFO pageUSLetter
void SetHeightMM(double aHeightInMM)
double GetHeightMM() const
double GetWidthMM() const
const VECTOR2D & GetSizeMils() const
wxPrintOrientation GetWxOrientation() const
static double GetCustomHeightMils()
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
wxString m_type
paper type: A4, A3, etc.
double GetHeightMils() const
wxPaperSize GetPaperId() const
static const PAGE_INFO pageB
static const PAGE_INFO pageA3
const wxString & GetType() const
static const PAGE_INFO pageA
static const PAGE_INFO pageA1
int GetWidthIU(double aIUScale) const
Gets the page width in IU.
double GetWidthMils() const
static double GetCustomWidthMils()
static const PAGE_INFO pageA0
static const PAGE_INFO pageUSLegal
static const PAGE_INFO pageA2
wxPaperSize m_paper_id
wx' style paper id.
static const PAGE_INFO pageGERBER
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
VECTOR2< double > VECTOR2D