| 129 | } |
| 130 | |
| 131 | void test5() { |
| 132 | |
| 133 | Paths64 solution; |
| 134 | Paths64 subject = { MakePath({0,0, 20,0, 40,0, 60,0, 80,0, 100,0}) }; |
| 135 | |
| 136 | ClipperOffset co; |
| 137 | co.AddPaths(subject, JoinType::Round, EndType::Butt); |
| 138 | co.Execute( |
| 139 | [](const Path64& path, |
| 140 | const PathD& path_norms, size_t curr_idx, size_t prev_idx) { |
| 141 | return double(curr_idx * curr_idx + 10); } |
| 142 | , solution); |
| 143 | |
| 144 | SvgWriter svg; |
| 145 | std::string filename = "test5.svg"; |
| 146 | SvgAddOpenSubject(svg, subject, FillRule::NonZero); |
| 147 | SvgAddSolution(svg, solution, FillRule::NonZero, false); |
| 148 | SvgSaveToFile(svg, filename, 400, 400); |
| 149 | System(filename); |
| 150 | } |
| 151 | |
| 152 | |
| 153 | int main() { |
no test coverage detected