Loading eeschema/eeredraw.cpp +460 −398 Original line number Diff line number Diff line Loading @@ -74,17 +74,22 @@ void SetHighLightStruct(EDA_BaseStruct *HighLight) HighLightStruct = HighLight; } /**********************************************************************/ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /**********************************************************************/ /* Redraws only the active window which is assumed to be whole visible. * Redraws only the active window which is assumed to be whole visible. */ { wxString title; if( GetScreen() == NULL ) return; if( GetScreen() == NULL ) return; ActiveScreen = GetScreen(); /* Forcage de la reinit de la brosse et plume courante */ GRResetPenAndBrush( DC ); DC->SetBackground( *wxBLACK_BRUSH ); Loading @@ -97,7 +102,8 @@ wxString title; DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); } if ( EraseBg ) DrawPanel->EraseScreen(DC); if( EraseBg ) DrawPanel->EraseScreen( DC ); DrawPanel->DrawBackGround( DC ); Loading @@ -124,9 +130,9 @@ wxString title; title.Printf( wxT( "[%s]" ), GetScreen()->m_FileName.GetData() ); SetTitle( title ); } } /*******************************************************************************/ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int PrintMask ) /*******************************************************************************/ Loading @@ -135,7 +141,6 @@ BASE_SCREEN * screen; wxBeginBusyCursor(); ActiveScreen = screen = m_Parent->GetScreen(); RedrawStructList( this, DC, screen->EEDrawList, GR_COPY ); Loading @@ -153,40 +158,58 @@ BASE_SCREEN * screen; void RedrawStructList( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* Structs, int DrawMode, int Color ) { #if 0 // enable this when we have virtual GetBoundingBox(): wxRegion upd = panel->GetUpdateRegion(); // get the update rect list // get the union of all rectangles in the update region, 'upd' wxRect dirtyRects = upd.GetBox(); EDA_Rect boxtest; #endif while( Structs ) { if( Structs->Type() == DRAW_PICK_ITEM_STRUCT_TYPE ) { RedrawOneStruct(panel, DC, ((DrawPickedStruct *) Structs)->m_PickedStruct, DrawMode, Color); EDA_BaseStruct* item = ( (DrawPickedStruct*) Structs )->m_PickedStruct; // if( dirtyRects.Intersects( item->GetBoundingBox() ) ) { RedrawOneStruct( panel, DC, item, DrawMode, Color ); } } else { if( !(Structs->m_Flags & IS_MOVED) ) { // if( dirtyRects.Intersects( Structs->GetBoundingBox() ) ) RedrawOneStruct( panel, DC, Structs, DrawMode, Color ); } } Structs = Structs->Pnext; } } /***************************************************************************** * Routine to redraw list of structs. * *****************************************************************************/ void RedrawOneStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* Struct, int DrawMode, int Color ) { if( Struct == NULL ) return; if ( Struct == NULL ) return; if (HighLightStruct == Struct) Color = HIGHLIGHT_COLOR; if( HighLightStruct == Struct ) Color = HIGHLIGHT_COLOR; Struct->Draw( panel, DC, wxPoint( 0, 0 ), DrawMode, Color ); } /*****************************************************************************************/ void EDA_DrawLineStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -197,8 +220,11 @@ int color; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) width *= 3; Loading @@ -206,7 +232,6 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); if( m_Layer == LAYER_NOTES ) GRDashedLine( &panel->m_ClipBox, DC, m_Start.x + offset.x, m_Start.y + offset.y, m_End.x + offset.x, m_End.y + offset.y, width, color ); else GRLine( &panel->m_ClipBox, DC, m_Start.x + offset.x, m_Start.y + offset.y, m_End.x + offset.x, m_End.y + offset.y, width, color ); Loading Loading @@ -237,10 +262,11 @@ void DrawMarkerStruct::Draw(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint & } Draw_Marqueur( panel, DC, m_Pos + offset, marqERC_bitmap, DrawMode, color ); } else Draw_Marqueur(panel, DC, m_Pos+offset, marq_bitmap, DrawMode, Color); else Draw_Marqueur( panel, DC, m_Pos + offset, marq_bitmap, DrawMode, Color ); } /*************************************************************************/ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -253,15 +279,17 @@ int width = g_DrawMinimunLineWidth; pX = m_Pos.x + offset.x; pY = m_Pos.y + offset.y; if( Color >= 0 ) color = Color; else color = ReturnLayerColor(LAYER_NOCONNECT); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( LAYER_NOCONNECT ); GRSetDrawMode( DC, DrawMode ); GRLine( &panel->m_ClipBox, DC, pX - DELTA, pY - DELTA, pX + DELTA, pY + DELTA, width, color ); GRLine( &panel->m_ClipBox, DC, pX + DELTA, pY - DELTA, pX - DELTA, pY + DELTA, width, color ); } /**************************************************************/ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -274,8 +302,10 @@ int color; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) Loading @@ -283,9 +313,9 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); GRLine( &panel->m_ClipBox, DC, m_Pos.x + offset.x, m_Pos.y + offset.y, m_End().x + offset.x, m_End().y + offset.y, width, color ); } /***************************************************************************** * Routine to redraw polyline struct. * *****************************************************************************/ Loading @@ -296,8 +326,11 @@ int i, color ; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) Loading @@ -315,11 +348,16 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); else { for( i = 1; i < m_NumOfPoints; i++ ) GRLineTo(&panel->m_ClipBox, DC, m_Points[i * 2] + offset.x, m_Points[i * 2 + 1] + offset.y, width, color); GRLineTo( &panel->m_ClipBox, DC, m_Points[i * 2] + offset.x, m_Points[i * 2 + 1] + offset.y, width, color ); } } /***************************************************************************** * Routine to redraw connection struct. * *****************************************************************************/ Loading @@ -329,22 +367,26 @@ void DrawJunctionStruct::Draw(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint int color; int Width = DRAWJUNCTION_SIZE; if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRFilledRect( &panel->m_ClipBox, DC, m_Pos.x - Width + offset.x, m_Pos.y - Width + offset.y, m_Pos.x + Width + offset.x, m_Pos.y + Width + offset.y, color, color ); } /**********************************************************/ void DrawStructsInGhost( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct, int dx, int dy ) /**********************************************************/ /* Routine de redessin en mode fantome (Dessin simplifie en g_XorMode et g_GhostColor de structures. Utilisee dans les deplacements de blocs * g_GhostColor * de structures. * Utilisee dans les deplacements de blocs */ { int Width, ii; Loading @@ -364,6 +406,7 @@ int width = g_DrawMinimunLineWidth; for( ii = 1; ii < Struct->m_NumOfPoints; ii++ ) GRLineTo( &panel->m_ClipBox, DC, Struct->m_Points[ii * 2] + dx, Struct->m_Points[ii * 2 + 1] + dy, width, g_GhostColor ); break; } Loading @@ -381,7 +424,12 @@ int width = g_DrawMinimunLineWidth; } if( (Struct->m_Flags & ENDPOINT) == 0 ) { GRLineTo(&panel->m_ClipBox, DC, Struct->m_End.x + dx, Struct->m_End.y + dy, width, g_GhostColor); GRLineTo( &panel->m_ClipBox, DC, Struct->m_End.x + dx, Struct->m_End.y + dy, width, g_GhostColor ); } else { Loading @@ -395,7 +443,12 @@ int width = g_DrawMinimunLineWidth; DrawBusEntryStruct* Struct = (DrawBusEntryStruct*) DrawStruct; int xx = Struct->m_Pos.x + dx, yy = Struct->m_Pos.y + dy; GRMoveTo( xx, yy ); GRLineTo(&panel->m_ClipBox, DC, Struct->m_Size.x + xx, Struct->m_Size.y + yy, width, g_GhostColor); GRLineTo( &panel->m_ClipBox, DC, Struct->m_Size.x + xx, Struct->m_Size.y + yy, width, g_GhostColor ); break; } Loading @@ -404,9 +457,14 @@ int width = g_DrawMinimunLineWidth; DrawJunctionStruct* Struct; Struct = (DrawJunctionStruct*) DrawStruct; Width = DRAWJUNCTION_SIZE; GRFilledRect(&panel->m_ClipBox, DC, Struct->m_Pos.x - Width + dx, Struct->m_Pos.y - Width + dy, Struct->m_Pos.x + Width + dx, Struct->m_Pos.y + Width + dy, g_GhostColor, g_GhostColor); GRFilledRect( &panel->m_ClipBox, DC, Struct->m_Pos.x - Width + dx, Struct->m_Pos.y - Width + dy, Struct->m_Pos.x + Width + dx, Struct->m_Pos.y + Width + dy, g_GhostColor, g_GhostColor ); break; } Loading Loading @@ -448,7 +506,8 @@ int width = g_DrawMinimunLineWidth; EDA_SchComponentStruct* Struct; Struct = (EDA_SchComponentStruct*) DrawStruct; LibEntry = FindLibPart( Struct->m_ChipName.GetData(), wxEmptyString, FIND_ROOT ); if( LibEntry == NULL ) break; if( LibEntry == NULL ) break; DrawingLibInGhost( panel, DC, LibEntry, Struct, Struct->m_Pos.x + dx, Struct->m_Pos.y + dy, Struct->m_Multi, Struct->m_Convert, Loading Loading @@ -479,20 +538,22 @@ int width = g_DrawMinimunLineWidth; void Draw_Marqueur( WinEDA_DrawPanel* panel, wxDC* DC, wxPoint pos, char* pt_bitmap, int DrawMode, int Color ) /************************************************************/ /* Place un repere sur l'ecran au point de coordonnees PCB pos_X, pos_Y Le marqueur est defini par un tableau de 2 + (lig*col) elements: 1er element: dim nbre ligne 2er element: dim nbre col suite: lig * col elements a 0 ou 1 : si 1 mise a color du pixel copie la description du marqueur en current_marqueur (global) /* * Place un repere sur l'ecran au point de coordonnees PCB pos_X, pos_Y * Le marqueur est defini par un tableau de 2 + (lig*col) elements: * 1er element: dim nbre ligne * 2er element: dim nbre col * suite: lig * col elements a 0 ou 1 : si 1 mise a color du pixel * * copie la description du marqueur en current_marqueur (global) */ { int px, py, color; char ii, ii_max, jj, jj_max; if ( pt_bitmap == NULL ) pt_bitmap = marq_bitmap; if( pt_bitmap == NULL ) pt_bitmap = marq_bitmap; px = GRMapX( pos.x ); py = GRMapY( pos.y ); Loading @@ -503,8 +564,10 @@ char ii, ii_max, jj, jj_max; px += *(pt_bitmap++); py += *(pt_bitmap++); color = *(pt_bitmap++); if ( (Color > 0) ) color = Color; if (color < 0) color = 0; if( (Color > 0) ) color = Color; if( color < 0 ) color = 0; GRSetDrawMode( DC, DrawMode ); /* Trace du bitmap */ Loading @@ -512,9 +575,8 @@ char ii, ii_max, jj, jj_max; { for( jj = 0; jj < jj_max; jj++, pt_bitmap++ ) { if(*pt_bitmap) GRSPutPixel(&panel->m_ClipBox, DC, px+ii , py+jj , color); if( *pt_bitmap ) GRSPutPixel( &panel->m_ClipBox, DC, px + ii, py + jj, color ); } } } Loading
eeschema/eeredraw.cpp +460 −398 Original line number Diff line number Diff line Loading @@ -74,17 +74,22 @@ void SetHighLightStruct(EDA_BaseStruct *HighLight) HighLightStruct = HighLight; } /**********************************************************************/ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) /**********************************************************************/ /* Redraws only the active window which is assumed to be whole visible. * Redraws only the active window which is assumed to be whole visible. */ { wxString title; if( GetScreen() == NULL ) return; if( GetScreen() == NULL ) return; ActiveScreen = GetScreen(); /* Forcage de la reinit de la brosse et plume courante */ GRResetPenAndBrush( DC ); DC->SetBackground( *wxBLACK_BRUSH ); Loading @@ -97,7 +102,8 @@ wxString title; DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); } if ( EraseBg ) DrawPanel->EraseScreen(DC); if( EraseBg ) DrawPanel->EraseScreen( DC ); DrawPanel->DrawBackGround( DC ); Loading @@ -124,9 +130,9 @@ wxString title; title.Printf( wxT( "[%s]" ), GetScreen()->m_FileName.GetData() ); SetTitle( title ); } } /*******************************************************************************/ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int PrintMask ) /*******************************************************************************/ Loading @@ -135,7 +141,6 @@ BASE_SCREEN * screen; wxBeginBusyCursor(); ActiveScreen = screen = m_Parent->GetScreen(); RedrawStructList( this, DC, screen->EEDrawList, GR_COPY ); Loading @@ -153,40 +158,58 @@ BASE_SCREEN * screen; void RedrawStructList( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* Structs, int DrawMode, int Color ) { #if 0 // enable this when we have virtual GetBoundingBox(): wxRegion upd = panel->GetUpdateRegion(); // get the update rect list // get the union of all rectangles in the update region, 'upd' wxRect dirtyRects = upd.GetBox(); EDA_Rect boxtest; #endif while( Structs ) { if( Structs->Type() == DRAW_PICK_ITEM_STRUCT_TYPE ) { RedrawOneStruct(panel, DC, ((DrawPickedStruct *) Structs)->m_PickedStruct, DrawMode, Color); EDA_BaseStruct* item = ( (DrawPickedStruct*) Structs )->m_PickedStruct; // if( dirtyRects.Intersects( item->GetBoundingBox() ) ) { RedrawOneStruct( panel, DC, item, DrawMode, Color ); } } else { if( !(Structs->m_Flags & IS_MOVED) ) { // if( dirtyRects.Intersects( Structs->GetBoundingBox() ) ) RedrawOneStruct( panel, DC, Structs, DrawMode, Color ); } } Structs = Structs->Pnext; } } /***************************************************************************** * Routine to redraw list of structs. * *****************************************************************************/ void RedrawOneStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* Struct, int DrawMode, int Color ) { if( Struct == NULL ) return; if ( Struct == NULL ) return; if (HighLightStruct == Struct) Color = HIGHLIGHT_COLOR; if( HighLightStruct == Struct ) Color = HIGHLIGHT_COLOR; Struct->Draw( panel, DC, wxPoint( 0, 0 ), DrawMode, Color ); } /*****************************************************************************************/ void EDA_DrawLineStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -197,8 +220,11 @@ int color; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) width *= 3; Loading @@ -206,7 +232,6 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); if( m_Layer == LAYER_NOTES ) GRDashedLine( &panel->m_ClipBox, DC, m_Start.x + offset.x, m_Start.y + offset.y, m_End.x + offset.x, m_End.y + offset.y, width, color ); else GRLine( &panel->m_ClipBox, DC, m_Start.x + offset.x, m_Start.y + offset.y, m_End.x + offset.x, m_End.y + offset.y, width, color ); Loading Loading @@ -237,10 +262,11 @@ void DrawMarkerStruct::Draw(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint & } Draw_Marqueur( panel, DC, m_Pos + offset, marqERC_bitmap, DrawMode, color ); } else Draw_Marqueur(panel, DC, m_Pos+offset, marq_bitmap, DrawMode, Color); else Draw_Marqueur( panel, DC, m_Pos + offset, marq_bitmap, DrawMode, Color ); } /*************************************************************************/ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -253,15 +279,17 @@ int width = g_DrawMinimunLineWidth; pX = m_Pos.x + offset.x; pY = m_Pos.y + offset.y; if( Color >= 0 ) color = Color; else color = ReturnLayerColor(LAYER_NOCONNECT); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( LAYER_NOCONNECT ); GRSetDrawMode( DC, DrawMode ); GRLine( &panel->m_ClipBox, DC, pX - DELTA, pY - DELTA, pX + DELTA, pY + DELTA, width, color ); GRLine( &panel->m_ClipBox, DC, pX + DELTA, pY - DELTA, pX - DELTA, pY + DELTA, width, color ); } /**************************************************************/ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -274,8 +302,10 @@ int color; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) Loading @@ -283,9 +313,9 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); GRLine( &panel->m_ClipBox, DC, m_Pos.x + offset.x, m_Pos.y + offset.y, m_End().x + offset.x, m_End().y + offset.y, width, color ); } /***************************************************************************** * Routine to redraw polyline struct. * *****************************************************************************/ Loading @@ -296,8 +326,11 @@ int i, color ; int zoom = panel->GetZoom(); int width = MAX( m_Width, g_DrawMinimunLineWidth ); if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); if( (m_Layer == LAYER_BUS) && (zoom <= 16) ) Loading @@ -315,11 +348,16 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth); else { for( i = 1; i < m_NumOfPoints; i++ ) GRLineTo(&panel->m_ClipBox, DC, m_Points[i * 2] + offset.x, m_Points[i * 2 + 1] + offset.y, width, color); GRLineTo( &panel->m_ClipBox, DC, m_Points[i * 2] + offset.x, m_Points[i * 2 + 1] + offset.y, width, color ); } } /***************************************************************************** * Routine to redraw connection struct. * *****************************************************************************/ Loading @@ -329,22 +367,26 @@ void DrawJunctionStruct::Draw(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint int color; int Width = DRAWJUNCTION_SIZE; if( Color >= 0 ) color = Color; else color = ReturnLayerColor(m_Layer); if( Color >= 0 ) color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRFilledRect( &panel->m_ClipBox, DC, m_Pos.x - Width + offset.x, m_Pos.y - Width + offset.y, m_Pos.x + Width + offset.x, m_Pos.y + Width + offset.y, color, color ); } /**********************************************************/ void DrawStructsInGhost( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct, int dx, int dy ) /**********************************************************/ /* Routine de redessin en mode fantome (Dessin simplifie en g_XorMode et g_GhostColor de structures. Utilisee dans les deplacements de blocs * g_GhostColor * de structures. * Utilisee dans les deplacements de blocs */ { int Width, ii; Loading @@ -364,6 +406,7 @@ int width = g_DrawMinimunLineWidth; for( ii = 1; ii < Struct->m_NumOfPoints; ii++ ) GRLineTo( &panel->m_ClipBox, DC, Struct->m_Points[ii * 2] + dx, Struct->m_Points[ii * 2 + 1] + dy, width, g_GhostColor ); break; } Loading @@ -381,7 +424,12 @@ int width = g_DrawMinimunLineWidth; } if( (Struct->m_Flags & ENDPOINT) == 0 ) { GRLineTo(&panel->m_ClipBox, DC, Struct->m_End.x + dx, Struct->m_End.y + dy, width, g_GhostColor); GRLineTo( &panel->m_ClipBox, DC, Struct->m_End.x + dx, Struct->m_End.y + dy, width, g_GhostColor ); } else { Loading @@ -395,7 +443,12 @@ int width = g_DrawMinimunLineWidth; DrawBusEntryStruct* Struct = (DrawBusEntryStruct*) DrawStruct; int xx = Struct->m_Pos.x + dx, yy = Struct->m_Pos.y + dy; GRMoveTo( xx, yy ); GRLineTo(&panel->m_ClipBox, DC, Struct->m_Size.x + xx, Struct->m_Size.y + yy, width, g_GhostColor); GRLineTo( &panel->m_ClipBox, DC, Struct->m_Size.x + xx, Struct->m_Size.y + yy, width, g_GhostColor ); break; } Loading @@ -404,9 +457,14 @@ int width = g_DrawMinimunLineWidth; DrawJunctionStruct* Struct; Struct = (DrawJunctionStruct*) DrawStruct; Width = DRAWJUNCTION_SIZE; GRFilledRect(&panel->m_ClipBox, DC, Struct->m_Pos.x - Width + dx, Struct->m_Pos.y - Width + dy, Struct->m_Pos.x + Width + dx, Struct->m_Pos.y + Width + dy, g_GhostColor, g_GhostColor); GRFilledRect( &panel->m_ClipBox, DC, Struct->m_Pos.x - Width + dx, Struct->m_Pos.y - Width + dy, Struct->m_Pos.x + Width + dx, Struct->m_Pos.y + Width + dy, g_GhostColor, g_GhostColor ); break; } Loading Loading @@ -448,7 +506,8 @@ int width = g_DrawMinimunLineWidth; EDA_SchComponentStruct* Struct; Struct = (EDA_SchComponentStruct*) DrawStruct; LibEntry = FindLibPart( Struct->m_ChipName.GetData(), wxEmptyString, FIND_ROOT ); if( LibEntry == NULL ) break; if( LibEntry == NULL ) break; DrawingLibInGhost( panel, DC, LibEntry, Struct, Struct->m_Pos.x + dx, Struct->m_Pos.y + dy, Struct->m_Multi, Struct->m_Convert, Loading Loading @@ -479,20 +538,22 @@ int width = g_DrawMinimunLineWidth; void Draw_Marqueur( WinEDA_DrawPanel* panel, wxDC* DC, wxPoint pos, char* pt_bitmap, int DrawMode, int Color ) /************************************************************/ /* Place un repere sur l'ecran au point de coordonnees PCB pos_X, pos_Y Le marqueur est defini par un tableau de 2 + (lig*col) elements: 1er element: dim nbre ligne 2er element: dim nbre col suite: lig * col elements a 0 ou 1 : si 1 mise a color du pixel copie la description du marqueur en current_marqueur (global) /* * Place un repere sur l'ecran au point de coordonnees PCB pos_X, pos_Y * Le marqueur est defini par un tableau de 2 + (lig*col) elements: * 1er element: dim nbre ligne * 2er element: dim nbre col * suite: lig * col elements a 0 ou 1 : si 1 mise a color du pixel * * copie la description du marqueur en current_marqueur (global) */ { int px, py, color; char ii, ii_max, jj, jj_max; if ( pt_bitmap == NULL ) pt_bitmap = marq_bitmap; if( pt_bitmap == NULL ) pt_bitmap = marq_bitmap; px = GRMapX( pos.x ); py = GRMapY( pos.y ); Loading @@ -503,8 +564,10 @@ char ii, ii_max, jj, jj_max; px += *(pt_bitmap++); py += *(pt_bitmap++); color = *(pt_bitmap++); if ( (Color > 0) ) color = Color; if (color < 0) color = 0; if( (Color > 0) ) color = Color; if( color < 0 ) color = 0; GRSetDrawMode( DC, DrawMode ); /* Trace du bitmap */ Loading @@ -512,9 +575,8 @@ char ii, ii_max, jj, jj_max; { for( jj = 0; jj < jj_max; jj++, pt_bitmap++ ) { if(*pt_bitmap) GRSPutPixel(&panel->m_ClipBox, DC, px+ii , py+jj , color); if( *pt_bitmap ) GRSPutPixel( &panel->m_ClipBox, DC, px + ii, py + jj, color ); } } }