void ZONE_CONTAINER::MoveEdge( const wxPoint& offset, int aEdge ) { // Move the start point of the selected edge: SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); // Move the end point of the selected edge: if( m_Poly->m_CornersList.IsEndContour( aEdge ) || aEdge == GetNumCorners() - 1 ) { int icont = m_Poly->GetContour( aEdge ); aEdge = m_Poly->GetContourStart( icont ); } else { aEdge++; } SetCornerPosition( aEdge, GetCornerPosition( aEdge ) + offset ); m_Poly->Hatch(); }
void ZONE_CONTAINER::MoveEdge( const wxPoint& offset ) { int ii = m_CornerSelection; // Move the start point of the selected edge: SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); // Move the end point of the selected edge: if( m_Poly->m_CornersList.IsEndContour( ii ) || ii == GetNumCorners() - 1 ) { int icont = m_Poly->GetContour( ii ); ii = m_Poly->GetContourStart( icont ); } else { ii++; } SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); m_Poly->Hatch(); }
void ZONE_CONTAINER::Move( const wxPoint& offset ) { /* move outlines */ for( unsigned ii = 0; ii < m_Poly->m_CornersList.GetCornersCount(); ii++ ) { SetCornerPosition( ii, GetCornerPosition( ii ) + offset ); } m_Poly->Hatch(); m_FilledPolysList.Move( VECTOR2I( offset.x, offset.y ) ); for( unsigned ic = 0; ic < m_FillSegmList.size(); ic++ ) { m_FillSegmList[ic].m_Start += offset; m_FillSegmList[ic].m_End += offset; } }