| 1233 | //------------------------------------------------------------------------ |
| 1234 | template<class VC> |
| 1235 | void path_base<VC>::invert_polygon(unsigned start, unsigned end) |
| 1236 | { |
| 1237 | unsigned i; |
| 1238 | unsigned tmp_cmd = m_vertices.command(start); |
| 1239 | |
| 1240 | --end; // Make "end" inclusive |
| 1241 | |
| 1242 | // Shift all commands to one position |
| 1243 | for(i = start; i < end; i++) |
| 1244 | { |
| 1245 | m_vertices.modify_command(i, m_vertices.command(i + 1)); |
| 1246 | } |
| 1247 | |
| 1248 | // Assign starting command to the ending command |
| 1249 | m_vertices.modify_command(end, tmp_cmd); |
| 1250 | |
| 1251 | // Reverse the polygon |
| 1252 | while(end > start) |
| 1253 | { |
| 1254 | m_vertices.swap_vertices(start++, end--); |
| 1255 | } |
| 1256 | } |
| 1257 | |
| 1258 | //------------------------------------------------------------------------ |
| 1259 | template<class VC> |
nothing calls this directly
no test coverage detected