MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / invert_polygon

Method invert_polygon

dep/agg/include/agg_path_storage.h:1300–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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>

Callers

nothing calls this directly

Calls 7

is_vertexFunction · 0.85
is_move_toFunction · 0.85
is_next_polyFunction · 0.85
commandMethod · 0.45
modify_commandMethod · 0.45
swap_verticesMethod · 0.45
total_verticesMethod · 0.45

Tested by

no test coverage detected