| 777 | } |
| 778 | |
| 779 | void Parser::closeStepRepeat() |
| 780 | { |
| 781 | addPath(); |
| 782 | for (int y = 0; y < m_stepRepeat.y; ++y) { |
| 783 | for (int x = 0; x < m_stepRepeat.x; ++x) { |
| 784 | const IntPoint pt(static_cast<cInt>(m_stepRepeat.i * x), static_cast<cInt>(m_stepRepeat.j * y)); |
| 785 | for (GraphicObject& go : m_stepRepeat.storage) { |
| 786 | Paths paths(go.paths()); |
| 787 | for (Path& path : paths) |
| 788 | TranslatePath(path, pt); |
| 789 | Path path(go.path()); |
| 790 | TranslatePath(path, pt); |
| 791 | auto state = go.state(); |
| 792 | state.setCurPos({ state.curPos().X + pt.X, state.curPos().Y + pt.Y }); |
| 793 | file->m_graphicObjects.push_back(GraphicObject(m_goId++, state, paths, go.gFile(), path)); |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | m_stepRepeat.reset(); |
| 798 | m_abSrIdStack.pop(); |
| 799 | } |
| 800 | |
| 801 | ApBlock* Parser::apBlock(int id) { return static_cast<ApBlock*>(file->m_apertures[id].get()); } |
| 802 | |