Loading change_log.txt +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ + pcbnew * D_PAD::Draw() so that it shows SMD pads as greyed out when in high contrast mode and not on current layer. Slight variation on this when laying down tracks: m_Route_Layer_BOTTOM or m_Route_Layer_TOP layers' SMD pads are not greyed out. * Changed English UI text for "Cotation" to "Dimension". 2007-Oct-11 UPDATE Geoff Harland <gharlandau@yahoo.com.au> ================================================================================ + pcbnew Loading include/gr_basic.h +46 −46 Original line number Diff line number Diff line Loading @@ -14,10 +14,10 @@ /* Constantes utiles */ #define GR_COPY 0 #define GR_OR 0x1000000 #define GR_XOR 0x2000000 #define GR_AND 0x4000000 #define GR_NXOR 0x8000000 #define GR_OR 0x01000000 #define GR_XOR 0x02000000 #define GR_AND 0x04000000 #define GR_NXOR 0x08000000 #define GR_SURBRILL 0x80000000 Loading pcbnew/class_pad.cpp +49 −5 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include "common.h" #include "pcbnew.h" #include "trigo.h" #include "id.h" // ID_TRACK_BUTT #ifdef PCBNEW #include "drag.h" Loading Loading @@ -238,11 +239,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int wxPoint coord[4]; int zoom; int fillpad = 0; PCB_SCREEN* screen; WinEDA_BasePcbFrame* frame; wxPoint shape_pos; screen = panel ? (PCB_SCREEN*) panel->m_Parent->m_CurrentScreen : (PCB_SCREEN*) ActiveScreen; PCB_SCREEN* screen = panel ? (PCB_SCREEN*) panel->m_Parent->m_CurrentScreen : (PCB_SCREEN*) ActiveScreen; // @todo: if panel could have been NULL above, how can we dereference it here safely? frame = (WinEDA_BasePcbFrame*) panel->m_Parent; /* Calcul de l'aspect du pad */ Loading @@ -255,8 +259,10 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int if( m_Flags & IS_MOVED ) fillpad = 0; #endif if( m_Masque_Layer & CMP_LAYER ) color = g_PadCMPColor; if( m_Masque_Layer & CUIVRE_LAYER ) color |= g_PadCUColor; Loading Loading @@ -322,6 +328,37 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int } } //-----<test this>----- // if SMD pad and high contrast mode if( m_Attribut==SMD && DisplayOpt.ContrastModeDisplay ) { // when editing tracks show SMD components on either of the routing // layers as normal, not greyed out. if( frame->m_ID_current_state == ID_TRACK_BUTT ) { if( !IsOnLayer( screen->m_Active_Layer ) && !IsOnLayer( screen->m_Route_Layer_TOP) && !IsOnLayer( screen->m_Route_Layer_BOTTOM) ) { color &= ~MASKCOLOR; color |= DARKDARKGRAY; } } // when not edting tracks, show SMD components not on active layer as greyed out else { if( !IsOnLayer( screen->m_Active_Layer ) ) { color &= ~MASKCOLOR; color |= DARKDARKGRAY; } } } //-----</test this>---- if( draw_mode & GR_SURBRILL ) { if( draw_mode & GR_AND ) Loading @@ -329,6 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int else color |= HIGHT_LIGHT_FLAG; } if( color & HIGHT_LIGHT_FLAG ) color = ColorRefs[color & MASKCOLOR].m_LightColor; Loading @@ -347,6 +385,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int dy = dy0 = m_Size.y >> 1; /* demi dim dx et dy */ angle = m_Orient; bool DisplayIsol = DisplayOpt.DisplayPadIsol; if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 ) DisplayIsol = FALSE; Loading Loading @@ -375,12 +414,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int /* calcul de l'entraxe de l'ellipse */ if( dx > dy ) /* ellipse horizontale */ { delta_cx = dx - dy; delta_cy = 0; delta_cx = dx - dy; delta_cy = 0; rotdx = m_Size.y; } else /* ellipse verticale */ { delta_cx = 0; delta_cy = dy - dx; delta_cx = 0; delta_cy = dy - dx; rotdx = m_Size.x; } RotatePoint( &delta_cx, &delta_cy, angle ); Loading Loading @@ -476,6 +517,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int if( fillpad && hole ) { color = g_IsPrinting ? WHITE : BLACK; // ou DARKGRAY; if( draw_mode != GR_XOR ) GRSetDrawMode( DC, GR_COPY ); else Loading @@ -491,6 +533,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int case OVALE: dx = m_Drill.x >> 1; dy = m_Drill.y >> 1; /* demi dim dx et dy */ /* calcul de l'entraxe de l'ellipse */ if( m_Drill.x > m_Drill.y ) /* ellipse horizontale */ { Loading Loading @@ -521,6 +564,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int { dx0 = MIN( dx0, dy0 ); int nc_color = BLUE; if( m_Masque_Layer & CMP_LAYER ) /* Trace forme \ */ GRLine( &panel->m_ClipBox, DC, cx0 - dx0, cy0 - dx0, cx0 + dx0, cy0 + dx0, 0, nc_color ); Loading pcbnew/class_track.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -561,7 +561,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode ) int rayon; int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( Type() == TYPEZONE && (!DisplayOpt.DisplayZones) ) if( Type() == TYPEZONE && !DisplayOpt.DisplayZones ) return; GRSetDrawMode( DC, draw_mode ); Loading pcbnew/cotation.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ END_EVENT_TABLE() WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame* parent, COTATION* Cotation, wxDC* DC, const wxPoint& framepos ) : wxDialog( parent, -1, _( "Cotation properties" ), framepos, wxSize( 340, 270 ), wxDialog( parent, -1, _( "Dimension properties" ), framepos, wxSize( 340, 270 ), DIALOG_STYLE ) { wxButton* Button; Loading Loading
change_log.txt +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. 2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ + pcbnew * D_PAD::Draw() so that it shows SMD pads as greyed out when in high contrast mode and not on current layer. Slight variation on this when laying down tracks: m_Route_Layer_BOTTOM or m_Route_Layer_TOP layers' SMD pads are not greyed out. * Changed English UI text for "Cotation" to "Dimension". 2007-Oct-11 UPDATE Geoff Harland <gharlandau@yahoo.com.au> ================================================================================ + pcbnew Loading
include/gr_basic.h +46 −46 Original line number Diff line number Diff line Loading @@ -14,10 +14,10 @@ /* Constantes utiles */ #define GR_COPY 0 #define GR_OR 0x1000000 #define GR_XOR 0x2000000 #define GR_AND 0x4000000 #define GR_NXOR 0x8000000 #define GR_OR 0x01000000 #define GR_XOR 0x02000000 #define GR_AND 0x04000000 #define GR_NXOR 0x08000000 #define GR_SURBRILL 0x80000000 Loading
pcbnew/class_pad.cpp +49 −5 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ #include "common.h" #include "pcbnew.h" #include "trigo.h" #include "id.h" // ID_TRACK_BUTT #ifdef PCBNEW #include "drag.h" Loading Loading @@ -238,11 +239,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int wxPoint coord[4]; int zoom; int fillpad = 0; PCB_SCREEN* screen; WinEDA_BasePcbFrame* frame; wxPoint shape_pos; screen = panel ? (PCB_SCREEN*) panel->m_Parent->m_CurrentScreen : (PCB_SCREEN*) ActiveScreen; PCB_SCREEN* screen = panel ? (PCB_SCREEN*) panel->m_Parent->m_CurrentScreen : (PCB_SCREEN*) ActiveScreen; // @todo: if panel could have been NULL above, how can we dereference it here safely? frame = (WinEDA_BasePcbFrame*) panel->m_Parent; /* Calcul de l'aspect du pad */ Loading @@ -255,8 +259,10 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int if( m_Flags & IS_MOVED ) fillpad = 0; #endif if( m_Masque_Layer & CMP_LAYER ) color = g_PadCMPColor; if( m_Masque_Layer & CUIVRE_LAYER ) color |= g_PadCUColor; Loading Loading @@ -322,6 +328,37 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int } } //-----<test this>----- // if SMD pad and high contrast mode if( m_Attribut==SMD && DisplayOpt.ContrastModeDisplay ) { // when editing tracks show SMD components on either of the routing // layers as normal, not greyed out. if( frame->m_ID_current_state == ID_TRACK_BUTT ) { if( !IsOnLayer( screen->m_Active_Layer ) && !IsOnLayer( screen->m_Route_Layer_TOP) && !IsOnLayer( screen->m_Route_Layer_BOTTOM) ) { color &= ~MASKCOLOR; color |= DARKDARKGRAY; } } // when not edting tracks, show SMD components not on active layer as greyed out else { if( !IsOnLayer( screen->m_Active_Layer ) ) { color &= ~MASKCOLOR; color |= DARKDARKGRAY; } } } //-----</test this>---- if( draw_mode & GR_SURBRILL ) { if( draw_mode & GR_AND ) Loading @@ -329,6 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int else color |= HIGHT_LIGHT_FLAG; } if( color & HIGHT_LIGHT_FLAG ) color = ColorRefs[color & MASKCOLOR].m_LightColor; Loading @@ -347,6 +385,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int dy = dy0 = m_Size.y >> 1; /* demi dim dx et dy */ angle = m_Orient; bool DisplayIsol = DisplayOpt.DisplayPadIsol; if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 ) DisplayIsol = FALSE; Loading Loading @@ -375,12 +414,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int /* calcul de l'entraxe de l'ellipse */ if( dx > dy ) /* ellipse horizontale */ { delta_cx = dx - dy; delta_cy = 0; delta_cx = dx - dy; delta_cy = 0; rotdx = m_Size.y; } else /* ellipse verticale */ { delta_cx = 0; delta_cy = dy - dx; delta_cx = 0; delta_cy = dy - dx; rotdx = m_Size.x; } RotatePoint( &delta_cx, &delta_cy, angle ); Loading Loading @@ -476,6 +517,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int if( fillpad && hole ) { color = g_IsPrinting ? WHITE : BLACK; // ou DARKGRAY; if( draw_mode != GR_XOR ) GRSetDrawMode( DC, GR_COPY ); else Loading @@ -491,6 +533,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int case OVALE: dx = m_Drill.x >> 1; dy = m_Drill.y >> 1; /* demi dim dx et dy */ /* calcul de l'entraxe de l'ellipse */ if( m_Drill.x > m_Drill.y ) /* ellipse horizontale */ { Loading Loading @@ -521,6 +564,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int { dx0 = MIN( dx0, dy0 ); int nc_color = BLUE; if( m_Masque_Layer & CMP_LAYER ) /* Trace forme \ */ GRLine( &panel->m_ClipBox, DC, cx0 - dx0, cy0 - dx0, cx0 + dx0, cy0 + dx0, 0, nc_color ); Loading
pcbnew/class_track.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -561,7 +561,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode ) int rayon; int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer; if( Type() == TYPEZONE && (!DisplayOpt.DisplayZones) ) if( Type() == TYPEZONE && !DisplayOpt.DisplayZones ) return; GRSetDrawMode( DC, draw_mode ); Loading
pcbnew/cotation.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ END_EVENT_TABLE() WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame* parent, COTATION* Cotation, wxDC* DC, const wxPoint& framepos ) : wxDialog( parent, -1, _( "Cotation properties" ), framepos, wxSize( 340, 270 ), wxDialog( parent, -1, _( "Dimension properties" ), framepos, wxSize( 340, 270 ), DIALOG_STYLE ) { wxButton* Button; Loading