Loading eeschema/block.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -959,19 +959,7 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct { screen->RemoveFromDrawList( DrawStruct ); switch( DrawStruct->Type() ) { case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE: case TYPE_SCH_COMPONENT: panel->PostDirtyRect( DrawStruct->GetBoundingBox() ); break; // other classes do not yet have GetBoundingBox() implementations default: D( DrawStruct->Show( 0, std::cout ); ) // tell me which classes still need GetBoundingBox support RedrawOneStruct( panel, DC, DrawStruct, g_XorMode ); } /* Unlink the structure */ DrawStruct->Pnext = DrawStruct->Pback = NULL; // Only one struct -> no link Loading eeschema/eeredraw.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint /*************************************************************************/ /* DRaw the "No Connect" symbol.. */ { #define DELTA (DRAWNOCONNECT_SIZE / 2) const int DELTA = (DRAWNOCONNECT_SIZE / 2); int pX, pY, color; int width = g_DrawMinimunLineWidth; Loading @@ -280,6 +280,15 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint } EDA_Rect DrawNoConnectStruct::GetBoundingBox() { const int DELTA = (DRAWNOCONNECT_SIZE / 2); EDA_Rect box( wxPoint(m_Pos.x-DELTA,m_Pos.y-DELTA), wxSize(2*DELTA,2*DELTA) ); box.Normalize(); return box; } /**************************************************************/ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -306,6 +315,15 @@ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& } EDA_Rect DrawBusEntryStruct::GetBoundingBox() { int dx = m_Pos.x - m_End().x; int dy = m_Pos.y - m_End().y; EDA_Rect box( wxPoint(m_Pos.x,m_Pos.y), wxSize(dx,dy) ); box.Normalize(); return box; } /***************************************************************************** * Routine to redraw polyline struct. * *****************************************************************************/ Loading eeschema/program.h +2 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ public: DrawNoConnectStruct* GenCopy(); virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); EDA_Rect GetBoundingBox(); }; Loading Loading @@ -189,6 +190,7 @@ public: wxPoint m_End(); // retourne la coord de fin du raccord virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); EDA_Rect GetBoundingBox(); }; class DrawPolylineStruct : public EDA_BaseStruct /* Polyligne (serie de segments) */ Loading Loading
eeschema/block.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -959,19 +959,7 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct { screen->RemoveFromDrawList( DrawStruct ); switch( DrawStruct->Type() ) { case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE: case TYPE_SCH_COMPONENT: panel->PostDirtyRect( DrawStruct->GetBoundingBox() ); break; // other classes do not yet have GetBoundingBox() implementations default: D( DrawStruct->Show( 0, std::cout ); ) // tell me which classes still need GetBoundingBox support RedrawOneStruct( panel, DC, DrawStruct, g_XorMode ); } /* Unlink the structure */ DrawStruct->Pnext = DrawStruct->Pback = NULL; // Only one struct -> no link Loading
eeschema/eeredraw.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint /*************************************************************************/ /* DRaw the "No Connect" symbol.. */ { #define DELTA (DRAWNOCONNECT_SIZE / 2) const int DELTA = (DRAWNOCONNECT_SIZE / 2); int pX, pY, color; int width = g_DrawMinimunLineWidth; Loading @@ -280,6 +280,15 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint } EDA_Rect DrawNoConnectStruct::GetBoundingBox() { const int DELTA = (DRAWNOCONNECT_SIZE / 2); EDA_Rect box( wxPoint(m_Pos.x-DELTA,m_Pos.y-DELTA), wxSize(2*DELTA,2*DELTA) ); box.Normalize(); return box; } /**************************************************************/ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) Loading @@ -306,6 +315,15 @@ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& } EDA_Rect DrawBusEntryStruct::GetBoundingBox() { int dx = m_Pos.x - m_End().x; int dy = m_Pos.y - m_End().y; EDA_Rect box( wxPoint(m_Pos.x,m_Pos.y), wxSize(dx,dy) ); box.Normalize(); return box; } /***************************************************************************** * Routine to redraw polyline struct. * *****************************************************************************/ Loading
eeschema/program.h +2 −0 Original line number Diff line number Diff line Loading @@ -160,6 +160,7 @@ public: DrawNoConnectStruct* GenCopy(); virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); EDA_Rect GetBoundingBox(); }; Loading Loading @@ -189,6 +190,7 @@ public: wxPoint m_End(); // retourne la coord de fin du raccord virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); EDA_Rect GetBoundingBox(); }; class DrawPolylineStruct : public EDA_BaseStruct /* Polyligne (serie de segments) */ Loading