fixed compil errors with USE_WX_ZOOM on.

This commit is contained in:
jean-pierre charras 2010-09-12 07:13:30 +02:00
parent a13ddf384c
commit 1b0da6c324
2 changed files with 4 additions and 4 deletions

View File

@ -487,7 +487,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
case PAD_CIRCLE: case PAD_CIRCLE:
#ifdef USE_WX_ZOOM #ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( hole ) > 1 ) if( aDC->LogicalToDeviceXRel( hole ) > 1 )
#else #else
if( aDrawInfo.m_Scale * hole > 1 ) /* draw hole if its size is enough */ if( aDrawInfo.m_Scale * hole > 1 ) /* draw hole if its size is enough */
#endif #endif
@ -602,7 +602,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
#define CHAR_SIZE_MIN 5 #define CHAR_SIZE_MIN 5
#ifdef USE_WX_ZOOM #ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small. if( aDC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small.
#else #else
if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable when size too small. if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable when size too small.
#endif #endif
@ -624,7 +624,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
tsize = min( AreaSize.y, AreaSize.x / shortname_len ); tsize = min( AreaSize.y, AreaSize.x / shortname_len );
#ifdef USE_WX_ZOOM #ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small. if( aDC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small.
#else #else
if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable in size too small. if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable in size too small.
#endif #endif

View File

@ -132,9 +132,9 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
// Give a margin // Give a margin
scale *= 0.7; scale *= 0.7;
dc.SetUserScale( scale, scale ); dc.SetUserScale( scale, scale );
drawInfo.m_Scale = scale;
#ifndef USE_WX_ZOOM #ifndef USE_WX_ZOOM
drawInfo.m_Scale = scale;
wxPoint org = ActiveScreen->m_DrawOrg; wxPoint org = ActiveScreen->m_DrawOrg;
wxPoint strt = ActiveScreen->m_StartVisu; wxPoint strt = ActiveScreen->m_StartVisu;
int pzoom = ActiveScreen->GetZoom(); int pzoom = ActiveScreen->GetZoom();