Loading common/base_struct.cpp +57 −40 Original line number Diff line number Diff line Loading @@ -697,6 +697,23 @@ bool EDA_Rect::Inside( const wxPoint& point ) } bool EDA_Rect::Intersects( const EDA_Rect aRect ) const { // this logic taken from wxWidgets' geometry.cpp file: int left = MAX( m_Pos.x , aRect.m_Pos.x ); int right = MIN( m_Pos.x+m_Size.x, aRect.m_Pos.x+aRect.m_Size.x ); int top = MAX( m_Pos.y , aRect.m_Pos.y ); int bottom = MIN( m_Pos.y+m_Size.y, aRect.m_Pos.y + aRect.m_Size.y ); if( left < right && top < bottom ) { return true; } return false; } /**************************************************/ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) /**************************************************/ Loading Loading
common/base_struct.cpp +57 −40 Original line number Diff line number Diff line Loading @@ -697,6 +697,23 @@ bool EDA_Rect::Inside( const wxPoint& point ) } bool EDA_Rect::Intersects( const EDA_Rect aRect ) const { // this logic taken from wxWidgets' geometry.cpp file: int left = MAX( m_Pos.x , aRect.m_Pos.x ); int right = MIN( m_Pos.x+m_Size.x, aRect.m_Pos.x+aRect.m_Size.x ); int top = MAX( m_Pos.y , aRect.m_Pos.y ); int bottom = MIN( m_Pos.y+m_Size.y, aRect.m_Pos.y + aRect.m_Size.y ); if( left < right && top < bottom ) { return true; } return false; } /**************************************************/ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy ) /**************************************************/ Loading