| 68 | //-------------------------------------------------------------------- |
| 69 | template <class VertexSource> |
| 70 | void add_path(VertexSource& vs, unsigned path_id = 0) |
| 71 | { |
| 72 | double x; |
| 73 | double y; |
| 74 | |
| 75 | unsigned cmd; |
| 76 | vs.rewind(path_id); |
| 77 | while (!is_stop(cmd = vs.vertex(&x, &y))) |
| 78 | { |
| 79 | if (is_move_to(cmd)) |
| 80 | { |
| 81 | move_to(x, y); |
| 82 | } |
| 83 | else |
| 84 | { |
| 85 | if (is_vertex(cmd)) |
| 86 | { |
| 87 | line_to(x, y); |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | finalize_path(); |
| 92 | } |
| 93 | |
| 94 | //-------------------------------------------------------------------- |
| 95 | double total_length() const; |
no test coverage detected