| 1298 | //------------------------------------------------------------------------ |
| 1299 | template <class VC> |
| 1300 | void path_base<VC>::invert_polygon(unsigned start, unsigned end) |
| 1301 | { |
| 1302 | unsigned i; |
| 1303 | unsigned tmp_cmd = m_vertices.command(start); |
| 1304 | |
| 1305 | --end; // Make "end" inclusive |
| 1306 | |
| 1307 | // Shift all commands to one position |
| 1308 | for (i = start; i < end; i++) |
| 1309 | { |
| 1310 | m_vertices.modify_command(i, m_vertices.command(i + 1)); |
| 1311 | } |
| 1312 | |
| 1313 | // Assign starting command to the ending command |
| 1314 | m_vertices.modify_command(end, tmp_cmd); |
| 1315 | |
| 1316 | // Reverse the polygon |
| 1317 | while (end > start) |
| 1318 | { |
| 1319 | m_vertices.swap_vertices(start++, end--); |
| 1320 | } |
| 1321 | } |
| 1322 | |
| 1323 | //------------------------------------------------------------------------ |
| 1324 | template <class VC> |
nothing calls this directly
no test coverage detected