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

Method translate

renderers/agg/include/agg_path_storage.h:1385–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1383 //------------------------------------------------------------------------
1384 template<class VC>
1385 void path_base<VC>::translate(double dx, double dy, unsigned path_id)
1386 {
1387 unsigned num_ver = m_vertices.total_vertices();
1388 for(; path_id < num_ver; path_id++)
1389 {
1390 double x, y;
1391 unsigned cmd = m_vertices.vertex(path_id, &x, &y);
1392 if(is_stop(cmd)) break;
1393 if(is_vertex(cmd))
1394 {
1395 x += dx;
1396 y += dy;
1397 m_vertices.modify_vertex(path_id, x, y);
1398 }
1399 }
1400 }
1401
1402 //------------------------------------------------------------------------
1403 template<class VC>

Callers

nothing calls this directly

Calls 5

is_stopFunction · 0.85
is_vertexFunction · 0.85
total_verticesMethod · 0.45
vertexMethod · 0.45
modify_vertexMethod · 0.45

Tested by

no test coverage detected