Commit 8680e9f3 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

All: change MILS_TO_IU_SCALING_FACTOR constant to IU_PER_MILS ( and...

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.
parents a00df5b3 758f2216
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -41,10 +41,10 @@




#if defined( PCBNEW ) || defined( CVPCB ) || defined( EESCHEMA )
#if defined( PCBNEW ) || defined( CVPCB ) || defined( EESCHEMA )
#define IU_TO_MM( x )       ( x / MM_TO_IU_SCALING_FACTOR )
#define IU_TO_MM( x )       ( x / IU_PER_MM )
#define IU_TO_IN( x )       ( x / MILS_TO_IU_SCALING_FACTOR / 1000 )
#define IU_TO_IN( x )       ( x / IU_PER_MILS / 1000 )
#define MM_TO_IU( x )       ( x * MM_TO_IU_SCALING_FACTOR )
#define MM_TO_IU( x )       ( x * IU_PER_MM )
#define IN_TO_IU( x )       ( x * MILS_TO_IU_SCALING_FACTOR * 1000 )
#define IN_TO_IU( x )       ( x * IU_PER_MILS * 1000 )
#else
#else
#error "Cannot resolve internal units due to no definition of EESCHEMA, CVPCB or PCBNEW."
#error "Cannot resolve internal units due to no definition of EESCHEMA, CVPCB or PCBNEW."
#endif
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@
// Conversion to application internal units defined at build time.
// Conversion to application internal units defined at build time.
#if defined( PCBNEW )
#if defined( PCBNEW )
#include <class_board_item.h>
#include <class_board_item.h>
#define MILS_TO_IU( x )     ( x * MILS_TO_IU_SCALING_FACTOR );
#define MILS_TO_IU( x )     ( x * IU_PER_MILS );
#elif defined( EESCHEMA )
#elif defined( EESCHEMA )
#include <sch_item_struct.h>
#include <sch_item_struct.h>
#define MILS_TO_IU( x )     ( x )
#define MILS_TO_IU( x )     ( x )
+289 −289
Original line number Original line Diff line number Diff line
@@ -237,7 +237,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
                                                   sheetSize.y/2) );
                                                   sheetSize.y/2) );


    if( aPrint_Sheet_Ref )
    if( aPrint_Sheet_Ref )
        frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness, MILS_TO_IU_SCALING_FACTOR );
        frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness, IU_PER_MILS );


    screen->m_IsPrinting   = false;
    screen->m_IsPrinting   = false;
    panel->SetClipBox( tmp );
    panel->SetClipBox( tmp );
+1 −1
Original line number Original line Diff line number Diff line
@@ -378,7 +378,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
    aScreen->Draw( panel, dc, GR_DEFAULT_DRAWMODE );
    aScreen->Draw( panel, dc, GR_DEFAULT_DRAWMODE );


    if( printReference )
    if( printReference )
        parent->TraceWorkSheet( dc, aScreen, g_DrawDefaultLineThickness, MILS_TO_IU_SCALING_FACTOR );
        parent->TraceWorkSheet( dc, aScreen, g_DrawDefaultLineThickness, IU_PER_MILS );


    g_DrawBgColor = bg_color;
    g_DrawBgColor = bg_color;
    aScreen->m_IsPrinting = false;
    aScreen->m_IsPrinting = false;
+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ void SCH_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )


    GetScreen()->Draw( m_canvas, DC, GR_DEFAULT_DRAWMODE );
    GetScreen()->Draw( m_canvas, DC, GR_DEFAULT_DRAWMODE );


    TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, MILS_TO_IU_SCALING_FACTOR );
    TraceWorkSheet( DC, GetScreen(), g_DrawDefaultLineThickness, IU_PER_MILS );


#ifdef USE_WX_OVERLAY
#ifdef USE_WX_OVERLAY
    if( IsShown() )
    if( IsShown() )
Loading