MCPcopy Create free account
hub / github.com/MapServer/MapServer / invert_polygon

Method invert_polygon

renderers/agg/include/agg_path_storage.h:1235–1256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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>

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