Schematic object hit testing improvements.

This commit is contained in:
Wayne Stambaugh
2010-12-13 10:59:00 -05:00
parent 95f3d88ba7
commit a8a99abefe
22 changed files with 373 additions and 167 deletions
+3 -4
View File
@@ -112,17 +112,16 @@ void MARKER_BASE::SetData( int aErrorCode, const wxPoint& aMarkerPos,
}
/******************************************************/
bool MARKER_BASE::HitTestMarker( const wxPoint& refPos )
/******************************************************/
bool MARKER_BASE::HitTestMarker( const wxPoint& refPos ) const
{
wxPoint rel_pos = refPos - m_Pos;
rel_pos.x /= m_ScalingFactor;
rel_pos.y /= m_ScalingFactor;
return m_ShapeBoundingBox.Inside(rel_pos);
return m_ShapeBoundingBox.Inside( rel_pos );
}
/**
* Function GetBoundingBoxMarker
* returns the orthogonal, bounding box of this object for display purposes.