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

Method translate

dep/agg/include/agg_path_storage.h:1459–1475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457 //------------------------------------------------------------------------
1458 template <class VC>
1459 void path_base<VC>::translate(double dx, double dy, unsigned path_id)
1460 {
1461 unsigned num_ver = m_vertices.total_vertices();
1462 for (; path_id < num_ver; path_id++)
1463 {
1464 double x, y;
1465 unsigned cmd = m_vertices.vertex(path_id, &x, &y);
1466 if (is_stop(cmd))
1467 break;
1468 if (is_vertex(cmd))
1469 {
1470 x += dx;
1471 y += dy;
1472 m_vertices.modify_vertex(path_id, x, y);
1473 }
1474 }
1475 }
1476
1477 //------------------------------------------------------------------------
1478 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