34#if wxABI_VERSION >= 20999
35 #define PAPER_A0 wxPAPER_A0
36 #define PAPER_A1 wxPAPER_A1
38 #define PAPER_A0 wxPAPER_A2
39 #define PAPER_A1 wxPAPER_A2
68#define MMsize( x, y ) VECTOR2D( EDA_UNIT_UTILS::Mm2mils( x ), EDA_UNIT_UTILS::Mm2mils( y ) )
106 m_type( aType ), m_size( aSizeMils ), m_paper_id( aPaperId )
212 if( aWidthInMils < 10 )
228 if( aHeightInMils < 10.0 )
229 aHeightInMils = 10.0;
231 return aHeightInMils;
263 if(
m_size.
y != aHeightInMils )
277 aFormatter->
Print( aNestLevel,
"(paper %s", aFormatter->
Quotew(
GetType() ).c_str() );
282 aFormatter->
Print( 0,
" %g %g",
287 aFormatter->
Print( 0,
" portrait" );
289 aFormatter->
Print( 0,
")\n" );
Describe the page size and margins of a paper page on which to eventually print or plot.
static const wxChar USLedger[]
static const wxChar USLetter[]
static const PAGE_INFO pageD
static const wxChar USLegal[]
static const PAGE_INFO pageC
bool m_portrait
true if portrait, false if landscape
static const PAGE_INFO pageA5
void Format(OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const
Output the page class to aFormatter in s-expression form.
void SetPortrait(bool aIsPortrait)
Rotate the paper page 90 degrees.
static void SetCustomWidthMils(double aWidthInMils)
Set the width of Custom page in mils for any custom page constructed or made via SetType() after maki...
static const wxChar Custom[]
"User" defined page type
static const PAGE_INFO pageUSLedger
static const PAGE_INFO pageE
static double s_user_width
static const PAGE_INFO pageA4
static const PAGE_INFO pageUser
void SetHeightMils(double aHeightInMils)
static double s_user_height
static const PAGE_INFO pageUSLetter
wxString m_type
paper type: A4, A3, etc.
double GetHeightMils() const
static const PAGE_INFO pageB
static const PAGE_INFO pageA3
static const wxChar GERBER[]
const wxString & GetType() const
static const PAGE_INFO pageA
static const PAGE_INFO pageA1
double GetWidthMils() const
PAGE_INFO(const wxString &aType=PAGE_INFO::A3, bool IsPortrait=false)
void SetWidthMils(double aWidthInMils)
static const PAGE_INFO pageA0
static void SetCustomHeightMils(double aHeightInMils)
Set the height of Custom page in mils for any custom page constructed or made via SetType() after mak...
static const PAGE_INFO pageUSLegal
static const PAGE_INFO pageA2
wxPaperSize m_paper_id
wx' style paper id.
static const PAGE_INFO pageGERBER
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Set the name of the page type and also the sizes and margins commonly associated with that type name.
This file contains miscellaneous commonly used macros and functions.
static double clampHeight(double aHeightInMils)
static double clampWidth(double aWidthInMils)
VECTOR2< double > VECTOR2D