From 758f22161ac15b8c1d38eb6fc31d541a76ea87d9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 26 Apr 2012 23:34:20 +0200 Subject: [PATCH] All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and MM_TO_IU_SCALING_FACTOR to IU_PER_MM) Also fix bug 985654. --- common/base_units.cpp | 8 ++--- common/eda_text.cpp | 2 +- eeschema/dialogs/dialog_SVG_print.cpp | 2 +- .../dialogs/dialog_print_using_printer.cpp | 2 +- eeschema/eeredraw.cpp | 2 +- eeschema/schframe.cpp | 2 +- gerbview/class_gbr_screen.cpp | 10 +++--- gerbview/class_gbr_screen.h | 2 +- gerbview/dcode.cpp | 4 +-- gerbview/draw_gerber_screen.cpp | 2 +- gerbview/excellon_read_drill_file.cpp | 2 +- gerbview/gerbview_frame.cpp | 2 +- gerbview/rs274_read_XY_and_IJ_coordinates.cpp | 32 +++++++++---------- gerbview/rs274x.cpp | 4 +-- include/common.h | 4 +-- include/convert_to_biu.h | 24 +++++++------- pcbnew/classpcb.cpp | 12 +++---- pcbnew/dialogs/dialog_SVG_print.cpp | 2 +- pcbnew/legacy_plugin.cpp | 2 +- pcbnew/printout_controler.cpp | 10 +++--- pcbnew/specctra_export.cpp | 6 ++-- pcbnew/tracepcb.cpp | 4 +-- 22 files changed, 70 insertions(+), 70 deletions(-) diff --git a/common/base_units.cpp b/common/base_units.cpp index 39b5890b63..a871a0d7ba 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -41,10 +41,10 @@ #if defined( PCBNEW ) || defined( CVPCB ) || defined( EESCHEMA ) -#define IU_TO_MM( x ) ( x / MM_PER_IU ) -#define IU_TO_IN( x ) ( x / MILS_PER_IU / 1000 ) -#define MM_TO_IU( x ) ( x * MM_PER_IU ) -#define IN_TO_IU( x ) ( x * MILS_PER_IU * 1000 ) +#define IU_TO_MM( x ) ( x / IU_PER_MM ) +#define IU_TO_IN( x ) ( x / IU_PER_MILS / 1000 ) +#define MM_TO_IU( x ) ( x * IU_PER_MM ) +#define IN_TO_IU( x ) ( x * IU_PER_MILS * 1000 ) #else #error "Cannot resolve internal units due to no definition of EESCHEMA, CVPCB or PCBNEW." #endif diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 56c70a1d79..6cbae0800f 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -37,7 +37,7 @@ // Conversion to application internal units defined at build time. #if defined( PCBNEW ) #include -#define MILS_TO_IU( x ) ( x * MILS_PER_IU ); +#define MILS_TO_IU( x ) ( x * IU_PER_MILS ); #elif defined( EESCHEMA ) #include #define MILS_TO_IU( x ) ( x ) diff --git a/eeschema/dialogs/dialog_SVG_print.cpp b/eeschema/dialogs/dialog_SVG_print.cpp index 27ef2de71e..5816f77655 100644 --- a/eeschema/dialogs/dialog_SVG_print.cpp +++ b/eeschema/dialogs/dialog_SVG_print.cpp @@ -237,7 +237,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame, sheetSize.y/2) ); if( aPrint_Sheet_Ref ) - frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness, MILS_PER_IU ); + frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness, IU_PER_MILS ); screen->m_IsPrinting = false; panel->SetClipBox( tmp ); diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index deef5807ee..c9a74cc03d 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -378,7 +378,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen ) aScreen->Draw( panel, dc, GR_DEFAULT_DRAWMODE ); if( printReference ) - parent->TraceWorkSheet( dc, aScreen, g_DrawDefaultLineThickness, MILS_PER_IU ); + parent->TraceWorkSheet( dc, aScreen, g_DrawDefaultLineThickness, IU_PER_MILS ); g_DrawBgColor = bg_color; aScreen->m_IsPrinting = false; diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp index 93893cc81c..f14b07820a 100644 --- a/eeschema/eeredraw.cpp +++ b/eeschema/eeredraw.cpp @@ -71,7 +71,7 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) GetScreen()->Draw( m_canvas, DC, GR_DEFAULT_DRAWMODE ); - TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, MILS_PER_IU ); + TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, IU_PER_MILS ); #ifdef USE_WX_OVERLAY if( IsShown() ) diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 5f16c9d2c9..d2a9a35a49 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -863,7 +863,7 @@ void SCH_EDIT_FRAME::SVG_Print( wxCommandEvent& event ) void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, int aPrintMask, bool aPrintMirrorMode, void* aData ) { GetScreen()->Draw( m_canvas, aDC, GR_DEFAULT_DRAWMODE ); - TraceWorkSheet( aDC, GetScreen(), g_DrawDefaultLineThickness, MILS_PER_IU ); + TraceWorkSheet( aDC, GetScreen(), g_DrawDefaultLineThickness, IU_PER_MILS ); } diff --git a/gerbview/class_gbr_screen.cpp b/gerbview/class_gbr_screen.cpp index f4ae6293a5..f11eac0157 100644 --- a/gerbview/class_gbr_screen.cpp +++ b/gerbview/class_gbr_screen.cpp @@ -17,10 +17,10 @@ #include -#define DMIL_GRID( x ) wxRealPoint( x * DECIMILS_PER_IU,\ - x * DECIMILS_PER_IU ) -#define MM_GRID( x ) wxRealPoint( x * MM_PER_IU,\ - x * MM_PER_IU ) +#define DMIL_GRID( x ) wxRealPoint( x * IU_PER_DECIMILS,\ + x * IU_PER_DECIMILS ) +#define MM_GRID( x ) wxRealPoint( x * IU_PER_MM,\ + x * IU_PER_MM ) /** @@ -118,5 +118,5 @@ GBR_SCREEN::~GBR_SCREEN() // virtual function int GBR_SCREEN::MilsToIuScalar() { - return (int)MILS_PER_IU; + return (int)IU_PER_MILS; } diff --git a/gerbview/class_gbr_screen.h b/gerbview/class_gbr_screen.h index ede5be2de7..d809bc135d 100644 --- a/gerbview/class_gbr_screen.h +++ b/gerbview/class_gbr_screen.h @@ -9,7 +9,7 @@ #include #include -#define ZOOM_FACTOR( x ) ( x * DECIMILS_PER_IU ) +#define ZOOM_FACTOR( x ) ( x * IU_PER_DECIMILS ) /* Handle info to display a board */ diff --git a/gerbview/dcode.cpp b/gerbview/dcode.cpp index fb96c3ba78..4f3193af41 100644 --- a/gerbview/dcode.cpp +++ b/gerbview/dcode.cpp @@ -175,8 +175,8 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName /* Updating gerber scale: */ - double dcode_scale = MILS_PER_IU; // By uniting dCode = mil, - // internal unit = MILS_PER_IU + double dcode_scale = IU_PER_MILS; // By uniting dCode = mil, + // internal unit = IU_PER_MILS current_Dcode = 0; if( D_Code_FullFileName.IsEmpty() ) diff --git a/gerbview/draw_gerber_screen.cpp b/gerbview/draw_gerber_screen.cpp index 6c09f37e47..a8b97ba378 100644 --- a/gerbview/draw_gerber_screen.cpp +++ b/gerbview/draw_gerber_screen.cpp @@ -107,7 +107,7 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) if( IsElementVisible( DCODES_VISIBLE ) ) DrawItemsDCodeID( DC, GR_COPY ); - TraceWorkSheet( DC, screen, 0, MILS_PER_IU ); + TraceWorkSheet( DC, screen, 0, IU_PER_MILS ); if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index 8335b790c1..19f6064e44 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -432,7 +432,7 @@ bool EXCELLON_IMAGE::Execute_HEADER_Command( char*& text ) if( dcode == NULL ) break; // conv_scale = scaling factor from inch to Internal Unit - double conv_scale = MILS_PER_IU * 1000; + double conv_scale = IU_PER_MILS * 1000; if( m_GerbMetric ) conv_scale /= 25.4; diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index e254438066..a81ed9a5a0 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -411,7 +411,7 @@ void GERBVIEW_FRAME::Liste_D_Codes() D_CODE* pt_D_code; wxString Line; wxArrayString list; - double scale = MILS_PER_IU * 1000; + double scale = IU_PER_MILS * 1000; int curr_layer = getActiveLayer(); for( int layer = 0; layer < 32; layer++ ) diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index 9fa669acb9..85417cbfc7 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -21,16 +21,16 @@ // for metric gerber units, the imperial to metric conversion is made in read functions static double scale_list[10] = { - 1000.0 * MILS_PER_IU, - 100.0 * MILS_PER_IU, - 10.0 * MILS_PER_IU, - 1.0 * MILS_PER_IU, - 0.1 * MILS_PER_IU, - 0.01 * MILS_PER_IU, - 0.001 * MILS_PER_IU, - 0.0001 * MILS_PER_IU, - 0.00001 * MILS_PER_IU, - 0.000001 * MILS_PER_IU + 1000.0 * IU_PER_MILS, + 100.0 * IU_PER_MILS, + 10.0 * IU_PER_MILS, + 1.0 * IU_PER_MILS, + 0.1 * IU_PER_MILS, + 0.01 * IU_PER_MILS, + 0.001 * IU_PER_MILS, + 0.0001 * IU_PER_MILS, + 0.00001 * IU_PER_MILS, + 0.000001 * IU_PER_MILS }; @@ -44,9 +44,9 @@ int scaletoIU( double aCoord, bool isMetric ) int ret; if( isMetric ) - ret = KiROUND( aCoord * MILS_PER_IU / 0.00254 ); + ret = KiROUND( aCoord * IU_PER_MILS / 0.00254 ); else - ret = KiROUND( aCoord * MILS_PER_IU ); + ret = KiROUND( aCoord * IU_PER_MILS ); return ret; } @@ -94,9 +94,9 @@ wxPoint GERBER_IMAGE::ReadXYCoord( char*& Text ) { // When X or Y values are float numbers, they are given in mm or inches if( m_GerbMetric ) // units are mm - current_coord = KiROUND( atof( line ) * MILS_PER_IU / 0.0254 ); + current_coord = KiROUND( atof( line ) * IU_PER_MILS / 0.0254 ); else // units are inches - current_coord = KiROUND( atof( line ) * MILS_PER_IU * 1000 ); + current_coord = KiROUND( atof( line ) * IU_PER_MILS * 1000 ); } else { @@ -185,9 +185,9 @@ wxPoint GERBER_IMAGE::ReadIJCoord( char*& Text ) { // When X or Y values are float numbers, they are given in mm or inches if( m_GerbMetric ) // units are mm - current_coord = KiROUND( atof( line ) * MILS_PER_IU / 0.0254 ); + current_coord = KiROUND( atof( line ) * IU_PER_MILS / 0.0254 ); else // units are inches - current_coord = KiROUND( atof( line ) * MILS_PER_IU * 1000 ); + current_coord = KiROUND( atof( line ) * IU_PER_MILS * 1000 ); } else { diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index f879f4f9fe..8af947aed7 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -160,7 +160,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, double fcoord; // conv_scale = scaling factor from inch to Internal Unit - double conv_scale = MILS_PER_IU * 1000; + double conv_scale = IU_PER_MILS * 1000; if( m_GerbMetric ) conv_scale /= 25.4; @@ -294,7 +294,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, m_GerbMetric = false; else if( code == MILLIMETER ) m_GerbMetric = true; - conv_scale = m_GerbMetric ? MILS_PER_IU / 25.4 : MILS_PER_IU; + conv_scale = m_GerbMetric ? IU_PER_MILS / 25.4 : IU_PER_MILS; break; case OFFSET: // command: OFAnnBnn (nn = float number) = layer Offset diff --git a/include/common.h b/include/common.h index 86ee71860f..3323ca7b9b 100644 --- a/include/common.h +++ b/include/common.h @@ -298,8 +298,8 @@ public: // Accessors returning "Internal Units (IU)". IUs are mils in EESCHEMA, // and either deci-mils or nanometers in PCBNew. #if defined(PCBNEW) || defined(EESCHEMA) || defined(GERBVIEW) - int GetWidthIU() const { return MILS_PER_IU * GetWidthMils(); } - int GetHeightIU() const { return MILS_PER_IU * GetHeightMils(); } + int GetWidthIU() const { return IU_PER_MILS * GetWidthMils(); } + int GetHeightIU() const { return IU_PER_MILS * GetHeightMils(); } const wxSize GetSizeIU() const { return wxSize( GetWidthIU(), GetHeightIU() ); } #endif diff --git a/include/convert_to_biu.h b/include/convert_to_biu.h index 8581550a0b..a4e9d62f19 100644 --- a/include/convert_to_biu.h +++ b/include/convert_to_biu.h @@ -20,26 +20,26 @@ #if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW) #if defined( USE_PCBNEW_NANOMETRES ) #if defined(GERBVIEW) - #define MM_PER_IU 1e5 // Gerbview uses 10 micrometer. + #define IU_PER_MM 1e5 // Gerbview uses 10 micrometer. #else - #define MM_PER_IU 1e6 // Pcbnew uses nanometers. + #define IU_PER_MM 1e6 // Pcbnew uses nanometers. #endif - #define MILS_PER_IU ( MM_PER_IU * 0.0254 ) - #define DECIMILS_PER_IU (MM_PER_IU * 0.00254 ) + #define IU_PER_MILS ( IU_PER_MM * 0.0254 ) + #define IU_PER_DECIMILS (IU_PER_MM * 0.00254 ) #else // Pcbnew in deci-mils. - #define DECIMILS_PER_IU 1 - #define MILS_PER_IU 10.0 - #define MM_PER_IU (1e4 / 25.4) + #define IU_PER_DECIMILS 1 + #define IU_PER_MILS 10.0 + #define IU_PER_MM (1e4 / 25.4) #endif /// Convert mils to PCBNEW internal units (iu). inline int Mils2iu( int mils ) { #if defined( USE_PCBNEW_NANOMETRES ) - double x = mils * MILS_PER_IU; + double x = mils * IU_PER_MILS; return int( x < 0 ? x - 0.5 : x + 0.5 ); #else - return mils * MILS_PER_IU; + return mils * IU_PER_MILS; #endif } @@ -47,7 +47,7 @@ inline int Mils2iu( int mils ) inline int DMils2iu( int dmils ) { #if defined( USE_PCBNEW_NANOMETRES ) - double x = dmils * DECIMILS_PER_IU; + double x = dmils * IU_PER_DECIMILS; return int( x < 0 ? x - 0.5 : x + 0.5 ); #else return dmils; @@ -55,8 +55,8 @@ inline int DMils2iu( int dmils ) } #else // Eeschema and anything else. -#define MILS_PER_IU 1.0 -#define MM_PER_IU (MILS_PER_IU / 0.0254) +#define IU_PER_MILS 1.0 +#define IU_PER_MM (IU_PER_MILS / 0.0254) inline int Mils2iu( int mils ) { diff --git a/pcbnew/classpcb.cpp b/pcbnew/classpcb.cpp index 9ee83d55b8..b873e36be2 100644 --- a/pcbnew/classpcb.cpp +++ b/pcbnew/classpcb.cpp @@ -19,11 +19,11 @@ #include -#define ZOOM_FACTOR( x ) ( x * DECIMILS_PER_IU ) -#define DMIL_GRID( x ) wxRealPoint( x * DECIMILS_PER_IU,\ - x * DECIMILS_PER_IU ) -#define MM_GRID( x ) wxRealPoint( x * MM_PER_IU,\ - x * MM_PER_IU ) +#define ZOOM_FACTOR( x ) ( x * IU_PER_DECIMILS ) +#define DMIL_GRID( x ) wxRealPoint( x * IU_PER_DECIMILS,\ + x * IU_PER_DECIMILS ) +#define MM_GRID( x ) wxRealPoint( x * IU_PER_MM,\ + x * IU_PER_MM ) /** @@ -133,7 +133,7 @@ PCB_SCREEN::~PCB_SCREEN() int PCB_SCREEN::MilsToIuScalar() { - return (int)MILS_PER_IU; + return (int)IU_PER_MILS; } diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index 02e6c3d968..08ddb1219a 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -271,7 +271,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName, g_DrawBgColor = WHITE; if( aPrint_Frame_Ref ) - m_Parent->TraceWorkSheet( &dc, screen, s_Parameters.m_PenDefaultSize, MILS_PER_IU ); + m_Parent->TraceWorkSheet( &dc, screen, s_Parameters.m_PenDefaultSize, IU_PER_MILS ); m_Parent->PrintPage( &dc, m_PrintMaskLayer, false, &s_Parameters); g_DrawBgColor = bg_color; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 9400bea717..d6598acae1 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -2694,7 +2694,7 @@ void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) // then, during the file loading process, to start a conversion from // mm to nanometers. - diskToBiu = DECIMILS_PER_IU; // BIUs are nanometers if USE_PCBNEW_NANOMETRES + diskToBiu = IU_PER_DECIMILS; // BIUs are nanometers if USE_PCBNEW_NANOMETRES // or BIUs are deci-mils } diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index fd29a10045..2a75bcd012 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -181,7 +181,7 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage() if( userscale == 0 ) // fit in page { // Margin = 10mm - int extra_margin = int( 10 * MM_PER_IU ); // deci-mils + int extra_margin = int( 10 * IU_PER_MM ); // deci-mils pageSizeIU.x = bbbox.GetWidth() + extra_margin * 2; pageSizeIU.y = bbbox.GetHeight() + extra_margin * 2; @@ -212,8 +212,8 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage() MapScreenSizeToPaper(); int w, h; GetPPIPrinter( &w, &h ); - double accurate_Xscale = ( (double) ( DrawZoom * w ) ) / (double) PCB_INTERNAL_UNIT; - double accurate_Yscale = ( (double) ( DrawZoom * h ) ) / (double) PCB_INTERNAL_UNIT; + double accurate_Xscale = ( (double) ( DrawZoom * w ) ) / (IU_PER_MILS*1000); + double accurate_Yscale = ( (double) ( DrawZoom * h ) ) / (IU_PER_MILS*1000); if( IsPreview() ) // Scale must take in account the DC size in Preview { @@ -275,7 +275,7 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage() if( m_PrintParams.m_Print_Sheet_Ref ) m_Parent->TraceWorkSheet( dc, screen, m_PrintParams.m_PenDefaultSize, - MILS_PER_IU ); + IU_PER_MILS ); if( printMirror ) { @@ -317,7 +317,7 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage() /* when printing in color mode, we use the graphic OR mode that gives the same look as the screen * But because the background is white when printing, we must use a trick: * In order to plot on a white background in OR mode we must: - * 1 - Plot all items in black, this creates a local black backgroud + * 1 - Plot all items in black, this creates a local black background * 2 - Plot in OR mode on black "local" background */ if( !m_PrintParams.m_Print_Black_and_White ) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 9419ed56f5..656fea3c7c 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -171,10 +171,10 @@ static inline double scale( int kicadDist ) #if defined(USE_PCBNEW_NANOMETRES) // nanometers to um - return kicadDist / ( MM_PER_IU / 1000.0 ); + return kicadDist / ( IU_PER_MM / 1000.0 ); // nanometers to mils - // return kicadDist/MILS_PER_IU; + // return kicadDist/IU_PER_MILS; #else // deci-mils to mils. @@ -185,7 +185,7 @@ static inline double scale( int kicadDist ) /// Convert integer internal units to float um static inline double IU2um( int kicadDist ) { - return kicadDist * (1000.0 / MM_PER_IU); + return kicadDist * (1000.0 / IU_PER_MM); } diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 98ed2a7dda..f1c26eb47f 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -67,7 +67,7 @@ void FOOTPRINT_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) GRSetDrawMode( DC, GR_COPY ); m_canvas->DrawBackGround( DC ); - TraceWorkSheet( DC, screen, 0, MILS_PER_IU ); + TraceWorkSheet( DC, screen, 0, IU_PER_MILS ); // Redraw the footprints for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() ) @@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg ) m_canvas->DrawBackGround( DC ); - TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, MILS_PER_IU ); + TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, IU_PER_MILS ); GetBoard()->Draw( m_canvas, DC, GR_OR | GR_ALLOW_HIGHCONTRAST);