| 79 | |
| 80 | |
| 81 | ARRAY_OPTIONS::TRANSFORM ARRAY_GRID_OPTIONS::GetTransform( int n, const VECTOR2I& aPos ) const |
| 82 | { |
| 83 | VECTOR2I point = gtItemPosRelativeToItem0( n ); |
| 84 | |
| 85 | // Bump the item by half the array size |
| 86 | if( m_centred ) |
| 87 | { |
| 88 | // Get the array extents |
| 89 | const int arrayExtentX = ( m_nx - 1 ) * m_delta.x + ( m_ny - 1 ) * m_offset.x; |
| 90 | const int arrayExtentY = ( m_ny - 1 ) * m_delta.y + ( m_nx - 1 ) * m_offset.y; |
| 91 | |
| 92 | point -= VECTOR2I( arrayExtentX, arrayExtentY ) / 2; |
| 93 | } |
| 94 | |
| 95 | return { point, ANGLE_0 }; |
| 96 | } |
| 97 | |
| 98 | |
| 99 | wxString ARRAY_GRID_OPTIONS::GetItemNumber( int n ) const |