| 39 | } |
| 40 | |
| 41 | void TestingZ_Int64() |
| 42 | { |
| 43 | |
| 44 | Paths64 subject, solution; |
| 45 | MyClass mc; |
| 46 | Clipper64 c64; |
| 47 | |
| 48 | subject.push_back(MakePath({ 100, 50, 10, 79, 65, 2, 65, 98, 10, 21 })); |
| 49 | c64.AddSubject(subject); |
| 50 | c64.SetZCallback( |
| 51 | std::bind(&MyClass::myZCB, mc, std::placeholders::_1, |
| 52 | std::placeholders::_2, std::placeholders::_3, |
| 53 | std::placeholders::_4, std::placeholders::_5)); |
| 54 | c64.Execute(ClipType::Union, FillRule::NonZero, solution); |
| 55 | |
| 56 | SvgWriter svg; |
| 57 | SvgAddSolution(svg, solution, FillRule::NonZero, false); |
| 58 | if (solution.size() > 0) { |
| 59 | // draw circles around intersection points - flagged by z == 1 |
| 60 | PathsD ellipses; |
| 61 | double r = 3.0; |
| 62 | for (const Point64& pt : solution[0]) |
| 63 | if (pt.z == 1) |
| 64 | { |
| 65 | ellipses.push_back(Ellipse(RectD(pt.x - r, pt.y - r, pt.x + r, pt.y + r), 11)); |
| 66 | } |
| 67 | SvgAddClip(svg, ellipses, FillRule::NonZero); |
| 68 | } |
| 69 | SvgSaveToFile(svg, "usingz_int64.svg", 800, 600, 20); |
| 70 | System("usingz_int64.svg"); |
| 71 | } |
| 72 | |
| 73 | void TestingZ_Double() |
| 74 | { |
nothing calls this directly
no test coverage detected